home *** CD-ROM | disk | FTP | other *** search
/ AGA Toolkit '97 / The AGA Toolkit '97.iso / programming / gui / gadutil / docs / gadutil.doc < prev    next >
Encoding:
Text File  |  1996-09-07  |  78.8 KB  |  2,434 lines

  1. TABLE OF CONTENTS
  2.  
  3. gadutil.library/GU_AddTail
  4. gadutil.library/GU_AttachList
  5. gadutil.library/GU_BeginRefresh
  6. gadutil.library/GU_BlockInput
  7. gadutil.library/GU_ChangeStr
  8. gadutil.library/GU_CheckVersion
  9. gadutil.library/GU_ClearList
  10. gadutil.library/GU_CloseCatalog
  11. gadutil.library/GU_CoordsInGadBox
  12. gadutil.library/GU_CountNodes
  13. gadutil.library/GU_CreateContext
  14. gadutil.library/GU_CreateGadgetA
  15. gadutil.library/GU_CreateLocMenuA
  16. gadutil.library/GU_CreateMenusA
  17. gadutil.library/GU_DetachList
  18. gadutil.library/GU_DisableGadget
  19. gadutil.library/GU_DrawBevelBoxA
  20. gadutil.library/GU_EndRefresh
  21. gadutil.library/GU_FilterIMsg
  22. gadutil.library/GU_FindNode
  23. gadutil.library/GU_FreeGadgets
  24. gadutil.library/GU_FreeInput
  25. gadutil.library/GU_FreeLayoutGadgets
  26. gadutil.library/GU_FreeMenus
  27. gadutil.library/GU_FreeVisualInfo
  28. gadutil.library/GU_GadgetArrayIndex
  29. gadutil.library/GU_GetGadgetAttrsA
  30. gadutil.library/GU_GetGadgetPtr
  31. gadutil.library/GU_GetIMsg
  32. gadutil.library/GU_GetLocaleStr
  33. gadutil.library/GU_GetVisualInfoA
  34. gadutil.library/GU_LayoutGadgetsA
  35. gadutil.library/GU_LayoutMenuItemsA
  36. gadutil.library/GU_LayoutMenusA
  37. gadutil.library/GU_NewList
  38. gadutil.library/GU_NodeDown
  39. gadutil.library/GU_NodeUp
  40. gadutil.library/GU_OpenCatalog
  41. gadutil.library/GU_OpenFont
  42. gadutil.library/GU_PostFilterIMsg
  43. gadutil.library/GU_RefreshBoxes
  44. gadutil.library/GU_RefreshWindow
  45. gadutil.library/GU_ReplyIMsg
  46. gadutil.library/GU_SetGadgetAttrsA
  47. gadutil.library/GU_SetGUGadAttrsA
  48. gadutil.library/GU_SetToggle
  49. gadutil.library/GU_TextWidth
  50. gadutil.library/GU_UpdateProgress
  51. gadutil.library/GU_SortList
  52. Œ gadutil.library/GU_AddTail                         gadutil.library/GU_AddTail
  53.  
  54.    NAME
  55.     GU_AddTail -- Add a node to the end of a listview's list.
  56.  
  57.    SYNOPSIS
  58.     node = GU_AddTail(gad, string, list)
  59.     D0, SR (Z)        D0   A0      A1
  60.  
  61.     struct Node *GU_AddTail(struct Gadget *, STRPTR, struct List *);
  62.  
  63.    FUNCTION
  64.     Add a node to the end of a list linked to a gadget (eg. a ListView).
  65.  
  66.     Normally this is used to add a node to a listview list, but it can
  67.     also be used if you eg have another list that that contains
  68.     information about the items in the listview. This list will then
  69.     also be deallocated at the same time as the listview's own list.
  70.     If you do this, be sure to clear the list header of this other list
  71.     when you want to deallocate the list (you can use the GU_NewList
  72.     function).
  73.  
  74.    INPUTS
  75.     gad    - Gadget to keep the nodes in (ie the ListView gadget).
  76.  
  77.     string - String to put in the nodes' LN_NAME field (visible entry).
  78.  
  79.     list   - List to add the node to.
  80.  
  81.    RESULT
  82.     node - Struct Node for success, FALSE for error.
  83.     SR(Z)- 0 for success, 1 for error.
  84.  
  85.    NOTES
  86.     The SR(Z) is probably most usable for assembly programmers.
  87.  
  88.    BUGS
  89.     none known
  90.  
  91.    SEE ALSO
  92.     GU_CountNodes(), GU_NewList(), GU_ClearList(), GU_DetachList(),
  93.     GU_AttachList(), GU_FindNode(), GU_NodeUp(), GU_NodeDown().
  94. gadutil.library/GU_AttachList                   gadutil.library/GU_AttachList
  95.  
  96.    NAME
  97.     GU_AttachList -- Change a listview's current list.
  98.  
  99.    SYNOPSIS
  100.     GU_AttachList(gad, win, list)
  101.                   D0   A0   A1
  102.  
  103.     VOID GU_AttachList(struct Gadget *, struct Window *, struct List *);
  104.  
  105.    FUNCTION
  106.     Attach a new (or changed) list to a listview. The new list will be
  107.     shown immediately.
  108.  
  109.    INPUTS
  110.     gad  - Gadget to change.
  111.     win  - Window that the gadget is located in.
  112.     list - List to connect to the listview gadget.
  113.  
  114.    RESULT
  115.     none
  116.  
  117.    BUGS
  118.     none known
  119.  
  120.    SEE ALSO
  121.     GU_AddTail(), GU_ClearList(), GU_DetachList(), GU_NewList()
  122.     GU_FindNode(), GU_NodeUp(), GU_NodeDown(), GU_CountNodes()
  123. gadutil.library/GU_BeginRefresh               gadutil.library/GU_BeginRefresh
  124.  
  125.    NAME
  126.     GU_BeginRefresh -- Begin refreshing friendly to GadTools.
  127.  
  128.    SYNOPSIS
  129.     GU_BeginRefresh(win)
  130.                     A0
  131.  
  132.     VOID GU_BeginRefresh(struct Window *);
  133.  
  134.    FUNCTION
  135.  
  136.     Invokes the intuition.library/BeginRefresh() function in a manner
  137.     friendly to the Gadget Toolkit. This function call permits the
  138.     GadTools gadgets to refresh themselves at the correct time.
  139.     Call GU_EndRefresh() function when done.
  140.  
  141.    INPUTS
  142.     win - pointer to Window structure for which a IDCMP_REFRESHWINDOW
  143.           IDCMP event was received.
  144.  
  145.    NOTES
  146.     See gadtools/GT_BeginRefresh() for more information.
  147.  
  148.    SEE ALSO
  149.     GU_EndRefresh(), gadtools/GT_BeginRefresh(), intuition/BeginRefresh()
  150. gadutil.library/GU_BlockInput                   gadutil.library/GU_BlockInput
  151.  
  152.    NAME
  153.     GU_BlockInput -- Block all input to a window.
  154.  
  155.    SYNOPSIS
  156.     GU_BlockInput(window)
  157.                   A0
  158.  
  159.     VOID GU_BlockInput(struct Window *);
  160.  
  161.    FUNCTION
  162.     Changes the window's pointer to the standard wait pointer (OS 2.0)
  163.     or the preferred wait pointer (OS 3.0+) and opens a requester to
  164.     block the user input of the given window. The requester that is
  165.     opened is not visible.
  166.  
  167.    INPUTS
  168.     window - the parent window for the requester. This is the window
  169.          that will be blocked for user input.
  170.  
  171.    EXAMPLE
  172.  
  173.     BlockInput(myWin);
  174.     About();
  175.     FreeInput();
  176.  
  177.     Will block the parent window for user input while displaying the
  178.     About requester of a program.
  179.  
  180.    SEE ALSO
  181.     GU_FreeInput()
  182. gadutil.library/GU_ChangeStr                     gadutil.library/GU_ChangeStr
  183.  
  184.    NAME
  185.     GU_ChangeStr -- Change the contents of string gadget.
  186.  
  187.    SYNOPSIS
  188.     GU_ChangeStr(gad, string, win)
  189.                  D0   A0      A1
  190.  
  191.     VOID GU_ChangeStr(struct Gadget *, struct Window *, STRPTR);
  192.  
  193.    FUNCTION
  194.     Change the string in a string gadget.
  195.  
  196.    INPUTS
  197.     gad    - Gadget to change
  198.     string - New string
  199.     win    - Window that the gadget is located in.
  200.  
  201.    RESULT
  202.     none
  203.  
  204.    BUGS
  205.     none known
  206.  
  207.    SEE ALSO
  208. gadutil.library/GU_CheckVersion               gadutil.library/GU_CheckVersion
  209.  
  210.    NAME
  211.     GU_CheckVersion -- Check the version.revision of a library
  212.  
  213.    SYNOPSIS
  214.     success = GU_CheckVersion(library, version, revision)
  215.     D0, SR(Z)                 A0       D0       D1
  216.  
  217.     BOOL GU_CheckVersion(struct Library *, UWORD, UWORD);
  218.  
  219.    FUNCTION
  220.     Compares a library's version and revision with a required one.
  221.     
  222.    INPUTS
  223.     library  - a pointer to an opened library/device
  224.     version  - the version of the library that is required
  225.     revision - the revision of the library that is required
  226.  
  227.    RESULT
  228.     success - TRUE if the required version is older or equal to the
  229.           opened one. FALSE otherwise.
  230.     SR(Z)   - 0 if function returns TRUE, 1 otherwise
  231.  
  232.    BUGS
  233.     none known
  234.  
  235.    SEE ALSO
  236. gadutil.library/GU_ClearList                     gadutil.library/GU_ClearList
  237.  
  238.    NAME
  239.     GU_ClearList -- Clear a listview gadget and deallocate all its nodes.
  240.  
  241.    SYNOPSIS
  242.     GU_ClearList(gad, win, list)
  243.                  D0   A0   A1
  244.  
  245.     VOID GU_ClearList(struct Gadget *, struct Window *, struct List *);
  246.  
  247.    FUNCTION
  248.     Clear a listview gadget and deallocate all nodes.
  249.  
  250.    INPUTS
  251.     gad  - Gadget To Change
  252.     win  - Window that the gadget is located in.
  253.     list - List structure to deallocate nodes from.
  254.  
  255.    RESULT
  256.     none
  257.  
  258.    BUGS
  259.     none known
  260.  
  261.    SEE ALSO
  262.     GU_AddTail(), GU_NewList(), GU_DetachList(), GU_AttachList()
  263.     GU_FindNode(), GU_NodeUp(), GU_NodeDown(), GU_CountNodes()
  264. gadutil.library/GU_CloseCatalog               gadutil.library/GU_CloseCatalog
  265.  
  266.    NAME
  267.     GU_CloseCatalog -- Close a message catalog.
  268.  
  269.    SYNOPSIS
  270.     GU_CloseCatalog(catalog)
  271.                     A0
  272.  
  273.     VOID GU_CloseCatalog(struct Catalog *);
  274.  
  275.    FUNCTION
  276.     Concludes access to a message catalog. The usage count of the
  277.     catalog is decremented. When this count reaches 0, the catalog
  278.     can be expunged from system memory whenever a memory panic occurs.
  279.  
  280.    INPUTS
  281.     catalog - the message catalog to close. A NULL catalog is a valid
  282.           parameter and is simply ignored.
  283.  
  284.    NOTES
  285.     This function is a shortcut to the locale/CloseCatalog() function.
  286.  
  287.    SEE ALSO
  288.     GU_OpenCatalog(), GU_GetLocaleStr()
  289. gadutil.library/GU_CoordsInGadBox           gadutil.library/GU_CoordsInGadBox
  290.  
  291.    NAME
  292.     GU_CoordsInGadBox -- Check if a coordinate pair is within a gadget.
  293.  
  294.    SYNOPSIS
  295.     IsInBox = GU_CoordsInGadBox(coords, gad)
  296.     D0,SR(Z)                    D0      A0
  297.  
  298.     BOOL GU_CoordsInGadBox(ULONG, struct Gadget *);
  299.  
  300.    FUNCTION
  301.     Check if a coordinate pair is within a gadget's border. This
  302.     function may be used to make coordinate sensitive AppWindows
  303.     (allows the user to drop a file on a string gadget etc.).
  304.     To use this function, you must save the coordinates from the
  305.     recieved message (AppMessage, IntuiMessage) to have something
  306.     to compare against.
  307.  
  308.    INPUTS
  309.     coords - a combined LONG of both the X and Y coordinates to
  310.          compare against. The X coordinate should be in the
  311.          upper word of the parameter.
  312.  
  313.     gad - the gadget to check the coordinates against.
  314.  
  315.    RESULT
  316.     IsInBox - TRUE if both given coordinates was within the gadget's
  317.           outer box (X coord is between gadx and gadx+gadw,
  318.           Y coord is between gady and gady+gadh). Otherwise this
  319.           function will return FALSE.
  320.  
  321.    EXAMPLES
  322.     Assembly language:
  323.         move.l    am_MouseX(a0),d0    ; Get X and Y coordinates
  324.         move.l    mystrgad(pc),a0
  325.         move.l    GadUtilBase(pc),a6
  326.         jsr    _LVOGU_CoordsInGadBox(a6)
  327.         beq.b    .notinbox        ; Not in gadget box
  328.     
  329.         ; Do what you want to do if the coordinates are
  330.         ; within the gadget box
  331.     .notinbox:
  332.         ; Here, you may want to check for some other gadgets
  333.  
  334.  
  335.     C:
  336.         long coords;
  337.         coords = (LONG)appmsg->MouseX << 16 | appmsg->MouseY;
  338.         if (CoordsInGadBox(coords,mystrgad) = TRUE)
  339.         {
  340.             /* Do what you want to do if the coordinates
  341.                are within the gadget box */
  342.         }
  343.         else
  344.         {
  345.             /* Here, you may want to check for some other
  346.                gadgets */
  347.         }
  348. gadutil.library/GU_CountNodes                   gadutil.library/GU_CountNodes
  349.  
  350.    NAME
  351.     GU_CountNodes -- Count number of nodes in a list.
  352.  
  353.    SYNOPSIS
  354.     numnodes = GU_CountNodes(list)
  355.     D0                       A0
  356.  
  357.     ULONG GU_CountNodes(struct List *);
  358.  
  359.    FUNCTION
  360.     This function will count the number of nodes attached to a list.
  361.  
  362.    INPUTS
  363.     list - a pointer to the list to get the number of nodes in
  364.  
  365.    RESULT
  366.     numnodes - Number of nodes that was in the list for the moment.
  367.                Note that count starts from one and not from zero!
  368.  
  369.    NOTES
  370.     Use Forbid() and Permit() around a call to this function if you
  371.     are using it on a list that can change at any time (e.g. a list
  372.     that wasn't created by yourself). This function may not be accurate
  373.     when you are using it on a system list.
  374.  
  375.    SEE ALSO
  376.     GU_AddTail(), GU_ClearList(), GU_DetachList(), GU_AttachList()
  377.     GU_FindNode(), GU_NodeUp(), GU_NodeDown(), GU_NewList()
  378. gadutil.library/GU_CreateContext             gadutil.library/GU_CreateContext
  379.  
  380.    NAME
  381.     GU_CreateContext -- Create a space for GadTools context data.
  382.  
  383.    SYNOPSIS
  384.     gad = GU_CreateContext(glistptr)
  385.     D0                     A0
  386.  
  387.     struct Gadget *GU_CreateContext(struct Gadget **);
  388.  
  389.    FUNCTION
  390.     This function is a replacement for the GadTools version. Use this
  391.     instead. This will make your program to take advantage of future
  392.     enhancements of gadutil.
  393.  
  394.     Creates a place for GadTools to store any context data it might
  395.     need for your window.  In reality, an unselectable invisible
  396.     gadget is created, with room for the context data.
  397.     This function also establishes the linkage from a glist type
  398.     pointer to the individual gadget pointers.  Call this function
  399.     before any of the other gadget creation calls.
  400.  
  401.    INPUTS
  402.  
  403.     glistptr - Address of a pointer to a Gadget, which was previously
  404.                set to NULL.  When all the gadget creation is done, you may
  405.                use that pointer as your NewWindow.FirstGadget, or
  406.                in intuition.library/AddGList(),
  407.                intuition.library/RefreshGList(), FreeGadgets(), etc.
  408.  
  409.    RESULT
  410.     gad - pointer to context gadget, or NULL if failure.
  411.  
  412.    NOTES
  413.     Look in gadtools/CreateContext() for more information.
  414.  
  415.    SEE ALSO
  416.     gadtools/CreateContext()
  417. gadutil.library/GU_CreateGadgetA                gadutil.library/CreateGadgetA
  418.  
  419.    NAME
  420.     GU_CreateGadgetA -- Create a gadget with built-in hotkey support.
  421.  
  422.    SYNOPSIS
  423.     gad = CreateGadgetA(kind, prevgad, newgad, taglist)
  424.     D0,A0               D0    A0       A1      A2
  425.  
  426.     struct Gadget *GU_CreateGadgetA(ULONG, struct Gadget *,
  427.                     struct NewGadget *, struct TagItem *);
  428.  
  429.    FUNCTION
  430.     GU_CreateGadgetA() allocates and initializes a new gadget of the
  431.     specified kind, and attaches it to the previous gadget. The gadget
  432.     is created based on the supplied kind, NewGadget structure, and
  433.     tags.
  434.  
  435.     This function differs from the GadTools equivalent by supporting
  436.     some extra tags to allow the gadget to be selected using the
  437.     keyboard.
  438.  
  439.    INPUTS
  440.     kind - kind of gadget to create. One of the XXX_KIND values
  441.            defined in <libraries/gadtools.h>.
  442.  
  443.     prevgad - pointer to the previous gadget that this new gadget
  444.           should be attached to. This function will fail if
  445.           this value is NULL.
  446.  
  447.     newgad - a filled in NewGadget structure describing the desired
  448.          gadget's size, position, label, etc.
  449.  
  450.     taglist - pointer to an array of tags providing optional extra
  451.           parameters, or NULL.
  452.  
  453.    TAGS
  454.     All kinds:
  455.  
  456.     GT_Underscore - Indicates the symbol that precedes the character
  457.         in the gadget label to be underscored. This can be to
  458.         indicate keyboard equivalents for gadgets. GadUtil has
  459.         the ability to process the keyboard equivalents if some
  460.         other tags are used.
  461.  
  462.     GU_Hotkey - This tag selects the hotkey to be used as an automatic
  463.         keyboard command for the gadget. The ti_Data field should
  464.         contain the ASCII or RAWKEY code for the hotkey.
  465.         This tag may be used together with the GU_HotkeyCase and
  466.         GU_LabelHotkey. The GU_RawKey tag requires this tag.
  467.  
  468.     GU_HotkeyCase - This tag makes the keyboard command case-sensitive.
  469.         This tag may not be used with GU_RawKey.
  470.  
  471.     GU_LabelHotkey - This tag picks the hotkey from the gadget text
  472.         field in the NewGadget structure when the gadget is created.
  473.         If no key is marked with the underscore, the GU_HotKey code
  474.         will be used.
  475.  
  476.         This tag supports and requires the GT_Underscore tag. The
  477.         character that was given in the GT_Underscore tag will be
  478.         used to find the code for the hotkey.
  479.  
  480.     GU_RawKey - This tag makes the hotkey code to a RAWKEY code. All
  481.         keys on the keyboard has one rawkey code that matches the
  482.         key.
  483.  
  484.         If your program also gets VANILLAKEY events, you must be
  485.         careful when selecting the rawkey code to be used as a
  486.         keyboard shortcut for this gadget. RAWKEY events will only
  487.         be sent for special keys (such as the HELP, Control, Alt
  488.         and function keys) that don't map to a single character. 
  489.         All keys that maps to a single character will be processed
  490.         as a VANILLAKEY event.
  491.  
  492.         This tag may not be used with (and will also disable) the
  493.         GU_HotkeyCase and GU_LabelHotkey tags.
  494.  
  495.     Kind specific tags:
  496.         See the GadTools function CreateGadgetA for all other tags.
  497.  
  498.    RESULT
  499.     gad - pointer to the new gadget, or NULL if the allocation failed
  500.           or if prevgad was NULL.
  501.  
  502.    NOTES
  503.     Note that the ng_VisualInfo and ng_TextAttr fields of the NewGadget
  504.     structure must be set to valid VisualInfo and TextAttr pointers, or
  505.     this function will fail.
  506.  
  507.    SEE ALSO
  508.     GU_FreeGadgets(), GU_SetGadgetAttrsA(), GU_GetVisualInfoA(),
  509.     GU_GetIMsg(), gadtools/CreateGadgetA, <libraries/gadtools.h>
  510. gadutil.library/GU_CreateLocMenuA           gadutil.library/GU_CreateLocMenuA
  511.  
  512.    NAME
  513.     GU_CreateLocMenuA -- Create a menu with localized items.
  514.  
  515.    SYNOPSIS
  516.     menu = GU_CreateLocMenuA(newmenu, gad_info, createtags, layouttags)
  517.     D0                       A0       A1        A2             A3
  518.  
  519.     struct Menu *GU_GetLocaleStr(struct NewMenu *, APTR,
  520.                 struct TagItem *, struct TagItem *);
  521.  
  522.    FUNCTION
  523.     Create and layout a localized menu. This function replaces both
  524.     the gadtools/CreateMenusA and gadtools/LayoutMenusA functions. See
  525.     those functions for a more in-depth description of this function.
  526.  
  527.    INPUTS
  528.     newmenu - pointer to an array of initialized struct NewMenus. This
  529.           differs from the GadTools function in that, instead of
  530.           giving pointers to strings in the nm_Label and nm_CommKey
  531.           fields of the structure, you should put a string ID in the
  532.           nm_Label field of the structure. The string must be in the
  533.           format "A\x00About...". The nm_CommKey field should be left
  534.           empty.  ^^^^^^
  535.               |    |
  536.               |    |- nm_Label field for the NewMenu structure
  537.               |
  538.               |- nm_CommKey replacement. If no keyboard shortcut,
  539.                     this field MUST CONTAIN A SPACE CHAR.
  540.                     The \x00 is a NULL character.
  541.  
  542.     gad_info - the value returned from GU_LayoutGadgetsA()
  543.  
  544.     createtags - tags for the "CreateMenusA" part of this routine. All
  545.              gadtools tags are supported (directly passed to GT).
  546.  
  547.     layouttags - tags for the "LayoutMenusA" part of this routine. All
  548.              gadtools tags are supported (directly passed to GT).
  549.  
  550.    TAGS
  551.     See the gadtools functions CreateMenusA() and LayoutMenusA().
  552.  
  553.    RESULT
  554.     menu - pointer to the resulting initialized and laid out menu structure,
  555.            ready to pass to the intuition function SetMenuStrip(), or NULL for
  556.            failure.
  557.  
  558.    SEE ALSO
  559.     GU_FreeMenus(), gadtools/CreateMenusA(), gadtools/LayoutMenusA(),
  560.     gadtools/FreeMenus()
  561. gadutil.library/GU_CreateMenusA               gadutil.library/GU_CreateMenusA
  562.  
  563.    NAME
  564.     GU_CreateMenusA -- Allocate and fill out a menu structure.
  565.  
  566.    SYNOPSIS
  567.     menu = GU_CreateMenusA(newmenu, taglist)
  568.     D0                     A0       A1
  569.  
  570.     struct Menu *GU_CreateMenusA(struct NewMenu *, struct TagItem *);
  571.  
  572.    FUNCTION
  573.     CreateMenusA() allocates and initializes a complete menu
  574.     structure based on the supplied array of NewMenu structures.
  575.     Optionally, CreateMenusA() can allocate and initialize a complete
  576.     set of menu items and sub-items for a single menu title.  This
  577.     is dictated by the contents of the array of NewMenus.
  578.  
  579.     These GadTools routines are only here to make it simpler for someone
  580.     who wants to use them. This for example, is of no use if you use the
  581.     GadUtil function GU_CreateLocMenuA() to define localized (optional)
  582.     menus with automatic hotkey handlimg etc.
  583.  
  584.    INPUTS
  585.     newmenu - pointer to an array of initialized struct NewMenus.
  586.     tagList - pointer to an array of tags providing optional extra
  587.           parameters, or NULL.
  588.  
  589.    TAGS
  590.     See gadtools/CreateMenusA() for available tags.
  591.  
  592.    RESULT
  593.     menu - pointer to the resulting initialized menu structure (or
  594.               the resulting FirstItem), with all the links for menu items
  595.               and subitems in place.
  596.               The result will be NULL if CreateMenusA() could not allocate
  597.               memory for the menus, or if the NewMenu array had an
  598.               illegal arrangement (eg. NM_SUB following NM_TITLE).
  599.               (see also the GTMN_SecondaryError tag above).
  600.  
  601.    NOTES
  602.     See gadtools/CreateMenusA() for more information.
  603.  
  604.    SEE ALSO
  605.     GU_LayoutMenusA(), GU_FreeMenus(), gadtools/CreateMenusA()
  606. gadutil.library/GU_DetachList                   gadutil.library/GU_DetachList
  607.  
  608.    NAME
  609.     GU_DetachList -- Disconnect the list from a listview gadget.
  610.  
  611.    SYNOPSIS
  612.     GU_DetachList(gad, win)
  613.                   D0   A0
  614.  
  615.     VOID GU_DetachList(struct Gadget *, struct Window *);
  616.  
  617.    FUNCTION
  618.     Detach a listview's list (without visual effect).
  619.     This has to be done before you can change anything in the list,
  620.     eg add a node, delete a node etc.
  621.  
  622.     Use GU_AttachList() to put the list back to the gadget.
  623.  
  624.    INPUTS
  625.     gad - Gadget to detach list from.
  626.     win - Window that the gadget is located in.
  627.  
  628.    RESULT
  629.     none
  630.  
  631.    BUGS
  632.     none known
  633.  
  634.    SEE ALSO
  635.     GU_AddTail(), GU_ClearList(), GU_NewList(), GU_AttachList()
  636.     GU_FindNode(), GU_NodeUp(), GU_NodeDown(), GU_CountNodes()
  637. gadutil.library/GU_DisableGadget             gadutil.library/GU_DisableGadget
  638.  
  639.    NAME
  640.     GU_DisableGadget -- Disable / Enable a gadget.
  641.  
  642.    SYNOPSIS
  643.     GU_DisableGadget(status, gadget, window)
  644.                      D0,     A0,     A1
  645.  
  646.     VOID GU_DisableGadget(BOOL, struct Gadget *, struct Window *);
  647.  
  648.    FUNCTION
  649.     Disables or enables a gadget (that supports this).
  650.  
  651.    INPUTS
  652.     status - The new status for the gadget, TRUE for disabled, FALSE for
  653.              enabled.
  654.     gadget - A pointer to the gadget to change.
  655.     window - Pointer to the window that the gadget is placed in.
  656.  
  657.    RESULT
  658.     none
  659.  
  660.    BUGS
  661.     none known
  662.  
  663.    SEE ALSO
  664. gadutil.library/GU_DrawBevelBoxA             gadutil.library/GU_DrawBevelBoxA
  665.  
  666.    NAME
  667.     GU_DrawBevelBoxA -- Draw a bevelled box.
  668.  
  669.    SYNOPSIS
  670.     GU_DrawBevelBoxA(rport, left, top, width, height, taglist)
  671.                      A0     D0    D1   D2     D3      A1
  672.  
  673.     VOID GU_DrawBevelBoxA(struct RastPort *, WORD, WORD, WORD, WORD,
  674.                   struct TagItem *);
  675.  
  676.    FUNCTION
  677.     This function renders a bevelled box of specified dimensions
  678.     and type into the supplied RastPort.
  679.  
  680.    INPUTS
  681.     rport - RastPort into which the box is to be drawn.
  682.     left - left edge of the box.
  683.     top - top edge of the box.
  684.     width - width of the box.
  685.     height - height of the box.
  686.     tagList - pointer to an array of tags providing extra parameters
  687.  
  688.    RESULT
  689.     none
  690.  
  691.    NOTES
  692.     See gadtools/DrawBevelBoxA() for more information.
  693.  
  694.    SEE ALSO
  695.     GU_GetVisualInfoA(), gadtools/DrawBevelBoxA()
  696. gadutil.library/GU_EndRefresh                   gadutil.library/GU_EndRefresh
  697.  
  698.    NAME
  699.     GU_EndRefresh -- End refreshing friendly to GadTools.
  700.  
  701.    SYNOPSIS
  702.     GU_EndRefresh(win, complete)
  703.                   A0   D0
  704.  
  705.     VOID GU_EndRefresh(struct Window *, BOOL);
  706.  
  707.    FUNCTION
  708.  
  709.     Invokes the intuition.library/EndRefresh() function in a manner
  710.     friendly to the Gadget Toolkit.  This function call permits
  711.     GadTools gadgets to refresh themselves at the correct time.
  712.     Call this function to EndRefresh() when you have used
  713.     GU_BeginRefresh().
  714.  
  715.    INPUTS
  716.     win - pointer to Window structure for which a IDCMP_REFRESHWINDOW
  717.           IDCMP event was received.
  718.     complete - TRUE when done with refreshing.
  719.  
  720.    NOTES
  721.     See gadtools/GT_EndRefresh for more information.
  722.  
  723.    SEE ALSO
  724.     GU_BeginRefresh(), gadtools/GT_EndRefresh(), intuition/EndRefresh()
  725. gadutil.library/GU_FilterIMsg                   gadutil.library/GU_FilterIMsg
  726.  
  727.    NAME
  728.     GU_FilterIMsg -- Filter an IntuiMessage through GadTools.
  729.  
  730.    SYNOPSIS
  731.     modimsg = GU_FilterIMsg(imsg)
  732.     D0                      A1
  733.  
  734.     struct IntuiMessage *GU_FilterIMsg(struct IntuiMessage *);
  735.  
  736.    FUNCTION
  737.     NOTE WELL:  Extremely few programs will actually need this function.
  738.     You almost certainly should be using GT_GetIMsg() and GT_ReplyIMsg()
  739.     only, and not GT_FilterIMsg() and GT_PostFilterIMsg().
  740.  
  741.     GT_FilterIMsg() takes the supplied IntuiMessage and asks the
  742.     Gadget Toolkit to consider and possibly act on it.  Returns
  743.     NULL if the message was only of significance to a GadTools gadget
  744.     (i.e. not to you), else returns a pointer to a modified IDCMP
  745.     message, which may contain additional information.
  746.  
  747.     You should examine the Class, Code, and IAddress fields of
  748.     the returned message to learn what happened.  Do not make
  749.     interpretations based on the original imsg.
  750.  
  751.     You should use GT_PostFilterIMsg() to revert to the original
  752.     IntuiMessage once you are done with the modified one.
  753.  
  754.    INPUTS
  755.     imsg - an IntuiMessage you obtained from a Window's UserPort.
  756.  
  757.    RESULT
  758.     modimsg - a modified IntuiMessage, possibly with extra information
  759.               from GadTools, or NULL. When NULL, the message passed in to
  760.           the function should be sent back to Intuition via ReplyMsg().
  761.  
  762.    NOTES
  763.     See gadtools/GT_FilterIMsg() for more information.
  764.  
  765.    SEE ALSO
  766.     GU_GetIMsg(), GU_PostFilterIMsg(), gadtools/GT_FilterIMsg()
  767. gadutil.library/GU_FindNode                       gadutil.library/GU_FindNode
  768.  
  769.    NAME
  770.     GU_FindNode -- Find the node structure of a given node number
  771.  
  772.    SYNOPSIS
  773.     node = GU_FindNode(list, number)
  774.     D0,A0,SR(Z)        A0    D0
  775.  
  776.     struct Node *GU_FindNode(struct List *, WORD);
  777.  
  778.    FUNCTION
  779.     Finds a specified node in a list.
  780.  
  781.    INPUTS
  782.     list   - Struct List. The list in where to search.
  783.     number - Number of the node to find (counting from 0).
  784.  
  785.    RESULT
  786.     node  - Address to the node structure or NULL if the node wasn't
  787.             existing.
  788.  
  789.     SR(Z) - 0 for success, 1 for failure.
  790.  
  791.    BUGS
  792.     none known
  793.  
  794.    SEE ALSO
  795.     GU_AddTail(), GU_ClearList(), GU_DetachList(), GU_AttachList()
  796.     GU_NodeUp(), GU_NodeDown(), GU_CountNodes(), GU_NewList()
  797. gadutil.library/GU_FreeGadgets                 gadutil.library/GU_FreeGadgets
  798.  
  799.    NAME
  800.     GU_FreeGadgets -- Free a linked list of gadgets.
  801.  
  802.    SYNOPSIS
  803.     GU_FreeGadgets(glist)
  804.                    A0
  805.  
  806.     VOID GU_FreeGadgets(struct Gadget *);
  807.  
  808.    FUNCTION
  809.     Frees all gadgets found on the linked list of gadgets beginning
  810.     with the specified one. Frees all the memory that was allocated
  811.     by GU_CreateGadgetA(). This function will return safely with no
  812.     action if it recieves a NULL parameter.
  813.  
  814.     Use this function in place of gadtools/FreeGadgets().
  815.  
  816.    INPUTS
  817.     glist - pointer to the first gadget in list to be freed
  818.  
  819.    SEE ALSO
  820.     GU_CreateGadgetA() , gadtools/FreeGadgets().
  821. gadutil.library/GU_FreeInput                     gadutil.library/GU_FreeInput
  822.  
  823.    NAME
  824.     GU_FreeInput -- Unblock input to a blocked window.
  825.  
  826.    SYNOPSIS
  827.     GU_FreeInput(window)
  828.                  A0
  829.  
  830.     VOID GU_FreeInput(struct Window *);
  831.  
  832.    FUNCTION
  833.     Unblock a window's user input. Call this function after blocking
  834.     the input with GU_BlockInput().
  835.  
  836.    INPUTS
  837.     window - the window that was blocked with GU_BlockInput().
  838.  
  839.    EXAMPLE
  840.  
  841.     BlockInput(myWin);
  842.     About();
  843.     FreeInput();
  844.  
  845.     Will block the parent window for user input while displaying the
  846.     About requester of a program.
  847.  
  848.    SEE ALSO
  849.     GU_BlockInput()
  850. gadutil.library/GU_FreeLayoutGadgets        gadutil.library/FreeLayoutGadgets
  851.  
  852.    NAME
  853.     GU_FreeLayoutGadgets -- Frees gadgets laid out with GU_LayoutGadgetsA().
  854.  
  855.    SYNOPSIS
  856.     GU_FreeLayoutGadgets(gad_info)
  857.                              A0
  858.  
  859.     VOID GU_FreeLayoutGadgets(APTR);
  860.  
  861.    FUNCTION
  862.     Frees gadgets laid out with LayoutGadgetsA().
  863.  
  864.    INPUTS
  865.     gad_info - The pointer returned by LayoutGadgetsA().
  866.  
  867.    RESULT
  868.     none
  869.  
  870.    SEE ALSO
  871. gadutil.library/GU_FreeMenus                     gadutil.library/GU_FreeMenus
  872.  
  873.    NAME
  874.     GU_FreeMenus -- Frees memory allocated by GU_CreateMenusA().
  875.  
  876.    SYNOPSIS
  877.     GU_FreeMenus(menu)
  878.                  A0
  879.  
  880.     VOID GU_FreeMenus(struct Menu *);
  881.  
  882.    FUNCTION
  883.     Frees the menus allocated by GU_CreateMenusA().  It is safe to
  884.     call this function with a NULL parameter.
  885.  
  886.    INPUTS
  887.     menu - pointer to menu structure (or first MenuItem) obtained
  888.            from GU_CreateMenusA().
  889.  
  890.    NOTES
  891.     See gadtools/FreeMenus() for more information.
  892.  
  893.    SEE ALSO
  894.     GU_CreateMenusA(), gadtools/FreeMenus()
  895. gadutil.library/GU_FreeVisualInfo           gadutil.library/GU_FreeVisualInfo
  896.  
  897.    NAME
  898.     GU_FreeVisualInfo -- Return any resources taken by GU_GetVisualInfoA
  899.  
  900.    SYNOPSIS
  901.     GU_FreeVisualInfo(vi)
  902.                       A0
  903.  
  904.     VOID GU_FreeVisualInfo(APTR);
  905.  
  906.    FUNCTION
  907.     FreeVisualInfo() returns any memory or other resources that
  908.     were allocated by GetVisualInfoA(). You should only call this
  909.     function once you are done with using the gadgets (i.e. after
  910.         CloseWindow()), but while the screen is still valid (i.e. before
  911.         CloseScreen() or UnlockPubScreen()).
  912.  
  913.    INPUTS
  914.     vi - pointer that was obtained by calling GetVisualInfoA(). This
  915.          value may be NULL.
  916.  
  917.    NOTES
  918.     See gadtools/FreeVisualInfo() for more information.
  919.  
  920.    SEE ALSO
  921.     GU_GetVisualInfoA(), gadtools/FreeVisualInfo()
  922. gadutil.library/GU_GadgetArrayIndex       gadutil.library/GU_GadgetArrayIndex
  923.  
  924.    NAME
  925.     GU_GadgetArrayIndex -- Get a gadget's index in the LayoutGadget array.
  926.  
  927.    SYNOPSIS
  928.     index = GU_GadgetArrayIndex(id, gadgets)
  929.     D0,D1,SR(Z)                 D0  A0
  930.  
  931.     WORD GU_GadgetArrayIndex(WORD, struct LayoutGadget *);
  932.  
  933.    FUNCTION
  934.     Get a gadget's index in the Layoutgadget structure.
  935.    INPUTS
  936.     id      - The ID of the gadget you want to find.
  937.     gadgets - The LayoutGadget array that this gadget is defined in.
  938.  
  939.    RESULT
  940.     index - The index into the LayoutGadget array of the entry with the
  941.             gadget ID you asked for. Returns -1 for failure.
  942.  
  943.     SR(Z) - Set for failure. Cleared otherwise. Probably only usable for
  944.             assembly language programmers.
  945.  
  946.    SEE ALSO
  947. gadutil.library/GU_GetGadgetAttrsA         gadutil.library/GU_GetGadgetAttrsA
  948.  
  949.    NAME
  950.     GU_GetGadgetAttrsA -- Request the attributes of a GadTools gadget.
  951.  
  952.    SYNOPSIS
  953.     numProcessed = GU_GetGadgetAttrsA(gad, win, req, taglist)
  954.     D0                                A0   A1   A2   A3
  955.  
  956.     LONG *GU_GetGadgetAttrsA(struct Gadget *, struct Window *,
  957.                  struct Requester *, struct TagItem *);
  958.  
  959.    FUNCTION
  960.     Retrieve the attributes of the specified gadget, according to the
  961.     attributes chosen in the tag list.  For each entry in the tag list,
  962.     ti_Tag identifies the attribute, and ti_Data is a pointer to
  963.     the long variable where you wish the result to be stored.
  964.  
  965.    INPUTS
  966.     gad     - Pointer to the gadget in question, may be NULL.
  967.     win     - Pointer to the window containing the gadget
  968.     req     - Reserved for future use, should always be NULL
  969.     taglist - Pointer to a TagItem list
  970.  
  971.    RESULT
  972.     numProcessed - The number of attributes successfully filled in.
  973.  
  974.    NOTES
  975.     See gadtools/GT_GetGadgetAttrsA() for tags and examples.
  976.  
  977.     Requires kickstart 3.0 (V39).
  978.  
  979.    SEE ALSO
  980.     GU_SetGadgetAttrsA(), gadtools/GT_GetGadgetAttrsA()
  981. gadutil.library/GU_GetGadgetPtr               gadutil.library/GU_GetGadgetPtr
  982.  
  983.    NAME
  984.     GU_GetGadgetPtr -- Get a pointer to a gadget's gadget structure.
  985.  
  986.    SYNOPSIS
  987.     gad = GU_GetGadgetPtr(id, gadgets)
  988.     D0,SR(Z)              D0  A0
  989.  
  990.     struct Gadget *GU_GetGadgetPtr(UWORD, struct LayoutGadget *);
  991.  
  992.    FUNCTION
  993.     Find a gadget's gadget structure by giving its ID. The gadget
  994.     pointer is always found last in the LayoutGadget structure. You
  995.     can use this function to get that pointer.
  996.     It is also possible to get the gadget structure by taking it
  997.     directly from the LayoutGadget structure array, but then you
  998.     must know exactly in which structure it is located. Assembly
  999.     language programmers can use a PC relative pointer to get the
  1000.     gadget pointer.
  1001.     
  1002.    INPUTS
  1003.     id - the ID of the gadget to search for
  1004.  
  1005.     gadgets - a pointer to the array of LayoutGadget structures.
  1006.  
  1007.    RESULT
  1008.     gad - pointer to the requested gadget. For bevelboxes, this
  1009.           function will return a BBoxData structure.
  1010.  
  1011.    EXAMPLE
  1012.  
  1013.      Some of the LayoutGadget structures from BetterTest.c:
  1014.  
  1015.      struct LayoutGadget gadgets[] = {
  1016.     { MSG_NEXTDRIVE, NextDriveGad, StdGTTags,   NULL },
  1017.     { MSG_PREVDRIVE, PrevDriveGad, StdGTTags,   NULL },
  1018.     { MSG_DRIVE,     DriveGad,     DriveGTTags, NULL },
  1019.     { MSG_REQUESTER, ReqGad,       StdGTTags,   NULL },
  1020.     { MSG_CHECKME,   CheckBoxGad,  StdGTTags,   NULL },
  1021.     { MSG_FILENAME,  FileNameGad,  StdGTTags,   NULL },
  1022.     { -1,            NULL,         NULL,        NULL }
  1023.      };
  1024.  
  1025.     The examples should get the gadget structure of the Requester
  1026.     gadget (not assuming that ID's begin with 0).
  1027.     There is two methods you can use to get a gadgets structure:
  1028.  
  1029.     1. Use the pointer in the array directly:
  1030.  
  1031.     thegadget = gadgets[3].lg_Gadget
  1032.  
  1033.     This will only work if you know in which LayoutGadget structure
  1034.     the gadget is in.
  1035.  
  1036.     2. Use this library function:
  1037.  
  1038.     thegadget = GU_GetGadgetPtr(MSG_REQUESTER, gadgets);
  1039.  
  1040.     This will always work if all gadgets have a unique ID.
  1041.  
  1042.  
  1043.      Some of the LayoutGadget structures from BetterTest.s:
  1044.  
  1045.     gadgets:
  1046.      GADGET  MSG_NEXTDRIVE,  NextDriveGad,   StdGTTags
  1047.      GADGET  MSG_PREVDRIVE,  PrevDriveGad,   StdGTTags
  1048.      GADGET  MSG_DRIVE,      DriveGad,       DriveGTTags
  1049.      GADGET  MSG_REQUESTER,  ReqGad,         StdGTTags
  1050.      GADGET  MSG_CHECKME,    CheckBoxGad,    StdGTTags
  1051.      GADGET  MSG_FILENAME,   FileNameGad,    StdGTTags
  1052.      GADGET  -1,NULL,NULL
  1053.  
  1054.      Assembly language programmers can use three methods to get the
  1055.      pointer:
  1056.  
  1057.     1. Use the pointer in the array directly:
  1058.  
  1059.         lea.l    gadgets(pc),a0    ; Get array
  1060.         moveq.l    #lg_SIZEOF,d0    ; Get the size of the LayoutGadget
  1061.         mulu    #3,d0        ;  struct and calculate offset to
  1062.                     ;  the right structure in the array
  1063.         move.l    lg_Gadget(a0,d0.l),d0    ; Get the gadget pointer
  1064.  
  1065.     This will only work if you know in which LayoutGadget structure
  1066.     the gadget is in.
  1067.  
  1068.     2. Use this library function:
  1069.  
  1070.         lea.l    gadgets(pc),a0    ; Get array
  1071.         moveq.l    #MSG_REQUESTER,d0    ; Gadget to search for
  1072.         jsr    _LVOGU_GetGadgetPtr(a6)    ; Get gadget, result in D0
  1073.  
  1074.     This will always work if all gadgets have a unique ID.
  1075.  
  1076.     3. Use an extra label for each gadget that should be easy to
  1077.        access:
  1078.  
  1079.     gadgets:
  1080.      GADGET  MSG_NEXTDRIVE,  NextDriveGad,   StdGTTags
  1081.      GADGET  MSG_PREVDRIVE,  PrevDriveGad,   StdGTTags
  1082.      GADGET  MSG_DRIVE,      DriveGad,       DriveGTTags
  1083.      GADGET  MSG_REQUESTER,  ReqGad,         StdGTTags
  1084.     reqgad:        equ    *-4
  1085.      GADGET  MSG_CHECKME,    CheckBoxGad,    StdGTTags
  1086.      GADGET  MSG_FILENAME,   FileNameGad,    StdGTTags
  1087.     filenamegad:    equ    *-4
  1088.      GADGET  -1,NULL,NULL
  1089.  
  1090.         move.l    reqgad(pc),d0        ; Get the gadget
  1091.  
  1092.     This will always work.
  1093. gadutil.library/GU_GetIMsg                         gadutil.library/GU_GetIMsg
  1094.  
  1095.    NAME
  1096.     GU_GetIMsg -- Get an IntuiMessage, process GadTools & Hotkey events.
  1097.  
  1098.    SYNOPSIS
  1099.     imsg = GU_GetIMsg(intuiport)
  1100.     D0,A0,SR(Z)       A0
  1101.  
  1102.     struct IntuiMessage *GU_GetIMsg(struct MsgPort *);
  1103.  
  1104.    FUNCTION
  1105.     Use GU_GetIMsg() in place of the usual exec.library/GetMsg() when
  1106.     reading IntuiMessages from your window's UserPort. If needed, the
  1107.     GadTools dispatcher will be invoked, and suitable processing will
  1108.     be done for gadget actions.
  1109.     If the message is an IDCMP_VANILLAKEY or an IDCMP_RAWKEY, this
  1110.     routine will search through all gadgets    for that key, and if it is
  1111.     found, the message will change to the type of message that gadget
  1112.     is supposed to send. If the key is not used as a hotkey, the
  1113.     message will not change. 
  1114.     If there are no messages (or if the only messages are meaningful
  1115.     only to GadTools/GadUtil), NULL will be returned.
  1116.  
  1117.    INPUTS
  1118.     intuiport - the Window->UserPort of a window that is using the
  1119.         GadUtil library.
  1120.  
  1121.    RESULT
  1122.     imsg - pointer to modified IntuiMessage, or NULL if there are
  1123.            no applicable messages.
  1124.  
  1125.     SR (Z) - the zero flag will be set if there was no message. This
  1126.            is probably only useful for assembly language programmers.
  1127.  
  1128.    NOTES
  1129.     Be sure to use GU_ReplyIMsg() and not exec.library/ReplyMsg() on
  1130.     messages obtained with GU_GetIMsg().
  1131.     If you intend to do more with the resulting message than read its
  1132.     fields, act on it, and reply it, you may find GU_FilterIMsg()
  1133.     more appropriate.
  1134.  
  1135.     Starting with V39 (of the OS), this function actually returns a
  1136.     pointer to an ExtIntuiMessage structure, but the prototype was
  1137.     not changed for source code compatibility with older software.
  1138.  
  1139.    SEE ALSO
  1140.     GU_ReplyIMsg(), GU_FilterIMsg()
  1141. gadutil.library/GU_GetLocaleStr               gadutil.library/GU_GetLocaleStr
  1142.  
  1143.    NAME
  1144.     GU_GetLocaleStr -- Get a localized string from a catalog.
  1145.  
  1146.    SYNOPSIS
  1147.     string = GU_GetLocaleStr(stringID, catalog, defstrings)
  1148.     D0,A0                    D0        A0       A1
  1149.  
  1150.     STRPTR GU_GetLocaleStr(ULONG, struct Catalog *, struct AppString *);
  1151.  
  1152.    FUNCTION
  1153.     Get a localized string, or the default string, from a catalog or from
  1154.     the programs built-in strings.
  1155.  
  1156.    INPUTS
  1157.     stringID - the ID of the string to get
  1158.  
  1159.     catalog - the opened catalog for the program
  1160.  
  1161.     defstrings - an array of AppString structures, the programs built-in
  1162.              strings and ID's.
  1163.  
  1164.    RESULT
  1165.     string - the address of the localized string, or if the catalog was not
  1166.          available (or if the selected language was the programs built-
  1167.          ins), a pointer to the default string with the given ID.
  1168.  
  1169.    SEE ALSO
  1170.     GU_OpenCatalog(), GU_CloseCatalog()
  1171. gadutil.library/GU_GetVisualInfoA           gadutil.library/GU_GetVisualInfoA
  1172.  
  1173.    NAME
  1174.     GU_GetVisualInfoA -- Get information GadTools needs for visuals.
  1175.  
  1176.    SYNOPSIS
  1177.     vi = GU_GetVisualInfoA(screen, taglist)
  1178.     D0                     A0      A1
  1179.  
  1180.     APTR GU_GetVisualInfoA(struct Screen *, struct TagItem *);
  1181.  
  1182.    FUNCTION
  1183.  
  1184.     Get a pointer to a (private) block of data containing various bits
  1185.     of information that GadTools needs to ensure the best quality
  1186.     visuals.  Use the result in the NewGadget structure of any gadget
  1187.     you create, or as a parameter to the various menu calls.  Once the
  1188.     gadgets/menus are no longer needed (after the last CloseWindow()),
  1189.     call FreeVisualInfo().
  1190.  
  1191.    INPUTS
  1192.     screen - pointer to the screen you will be opening on. This parameter
  1193.          may be NULL, in which case this function fails.
  1194.     tagList - pointer to an array of tags providing optional extra
  1195.           parameters, or NULL.
  1196.  
  1197.    RESULT
  1198.     vi - pointer to private data, or NULL for failure
  1199.  
  1200.    NOTES
  1201.     See gadtools/GetVisualInfoA() for more information.
  1202.  
  1203.    SEE ALSO
  1204.     GU_FreeVisualInfo(), gadtools/FreeVisualInfo(), intuition/LockPubScreen(),
  1205.     intuition/UnlockPubScreen()
  1206. gadutil.library/GU_LayoutGadgetsA              gadutil.library/LayoutGadgetsA
  1207.  
  1208.    NAME
  1209.     GU_LayoutGadgetsA -- Formats an array of GadTools gadgets.
  1210.  
  1211.    SYNOPSIS
  1212.     gad_info = GU_LayoutGadgetsA(gad_list, gadgets, screen, taglist)
  1213.     D0,A0                        A0        A1       A2      A3
  1214.  
  1215.     APTR GU_LayoutGadgetsA(struct Gadget **, struct LayoutGadget *,
  1216.         struct Screen *, struct TagItem *);
  1217.  
  1218.    FUNCTION
  1219.     Creates a laid-out gadget list from a LayoutGadget array, which
  1220.     describes each gadget you want to create. Gadgets you create can
  1221.     be any of the gadget kinds supported by GadTools, as well as any
  1222.     of the extended gadget kinds provided by GadUtil.
  1223.     The gadgets created by this routine, can easily be defined so that
  1224.     they adjust their sizes and positions to accomodate fonts of any
  1225.     size, and also adapt to different locale strings.
  1226.     
  1227.    INPUTS
  1228.     gad_list - a pointer to the gadget list pointer. This will be
  1229.            ready to pass to OpenWindowTagList() or AddGList().
  1230.  
  1231.     gadgets - an array of LayoutGadget structures. Each element in
  1232.           the array describes one of the gadgets that you will
  1233.           be creating. Each LayoutGadget structure in the array
  1234.           should be initialized as follows:
  1235.  
  1236.           lg_GadgetID - the ID for this gadget. An ID of -1
  1237.                 terminates the array.
  1238.  
  1239.           lg_LayoutTags - tags that describes each gadget to
  1240.                   create. These tags is used to calculate
  1241.                   positions, sizes and other attributes
  1242.                   of the created gadgets.
  1243.  
  1244.           lg_GadToolsTags - additional tags for GadTools gadgets.
  1245.                     This would be the same set of tags that
  1246.                     you might pass to CreateGadgetA() if
  1247.                     you were using GadTools directly.
  1248.  
  1249.           lg_Gadget - the pointer to the Gadget structure created
  1250.                   for this gadget will be placed here. You
  1251.                   should initialize this field to NULL. The
  1252.                   gadget structure created should be considered
  1253.                   READ ONLY! This field will contain a pointer
  1254.                   to a struct BBoxData, if the created gadget
  1255.                   kind is a BEVELBOX_KIND.
  1256.  
  1257.           Assembly language programmers can use the macro GADGET:
  1258.  
  1259.             GADGET GadgetID, Gad_LayoutTags, Gad_GadToolsTags
  1260.  
  1261.     screen - a pointer to the screen that the gadgets will be created
  1262.          for. This is required, so that the layuot routines can
  1263.          get display info about the screen where the rendering
  1264.          will be done. Use LockPubScreen() to use a public screen,
  1265.          or OpenScreenTagList(), if you want to use your own screen.
  1266.  
  1267.     taglist - pointer to an array of tags providing optional extra
  1268.           parameters, or NULL.
  1269.  
  1270.                   These tags can be used here:
  1271.  
  1272.                     GU_RightExtreme (ULONG *)
  1273.                       A pointer to a longword that is used to store the
  1274.                       rightmost point that a gadget will exist in.
  1275.  
  1276.                     GU_LowerExtreme (ULONG *)
  1277.                       A pointer to a longword that is used to store the
  1278.                       lowermost point that a gadget woll exist in.
  1279.  
  1280.                     GU_Catalog (struct Catalog *)
  1281.                       A pointer to the programs translation catalog. NULL
  1282.                       indicates that the program should use the internal
  1283.                       strings. You must open the catalog by yourself (use
  1284.                       GU_OpenCatalog() or locale/OpenCatalog). The
  1285.                       GU_AppStrings tag MUST be used together with this tag.
  1286.  
  1287.                     GU_DefTextAttr (struct TextAttr *)
  1288.                       Specifies the default font to use with all gadgets. Can
  1289.                       be overridden with GU_TextAttr tag for each gadget.
  1290.  
  1291.                     GU_AppStrings (struct AppString *)
  1292.                       A pointer to an array of AppString structures. These
  1293.                       strutures contains the programs internal strings. This
  1294.                       tag must be used together with the GU_Catalog tag.
  1295.  
  1296.                     GU_BorderLeft (ULONG)
  1297.                       Size of the window's left border.
  1298.  
  1299.                     GU_BorderTop (ULONG)
  1300.                       Size of the window's top border.
  1301.  
  1302.                     GU_NoCreate (BOOL)
  1303.                       Don't create any gadgets. Useful to determine if the
  1304.                       window will fit on the screen etc.
  1305.  
  1306.                     GU_MinimumIDCMP (ULONG *)
  1307.                       A pointer to a longword that is used to store the
  1308.                       minimum required IDCMP flags, so that all gadgets will
  1309.                       work. The longword can already be initialized, and any
  1310.                       new needed IDCMP flags will be appended to that
  1311.                       longword.
  1312.  
  1313.    TAGS
  1314.  
  1315.    Tags for the gadgets lg_LayoutTags taglist. The other tags can be found in
  1316.    the autodoc to gadtools.library/CreateGadgetA().
  1317.  
  1318.    GU_GadgetKind (ULONG)
  1319.       Can be any of the standard GadTools gadget kinds, or one of the
  1320.       extensions provided by GadUtil. Currently extended types are:
  1321.  
  1322.          IMAGE_KIND
  1323.            A gadget that uses an Intuition Image structure for its
  1324.            contents. Selected and unselected states can use different
  1325.            images. The images are centered automatically.
  1326.  
  1327.            Extra tags for IMAGE_KIND:
  1328.  
  1329.               GUIM_Image (struct Image *)
  1330.                  Image for the gadget in its unselected state. This is
  1331.                  the only required (extra) tag for IMAGE_KIND gadgets.
  1332.  
  1333.               GUIM_SelectImg (struct Image *)
  1334.                  Image for the gadget in its selected state. If this tag
  1335.                  is omitted, the selected image will be the same as the
  1336.                  unselected, and only the border and the background color
  1337.                  will change (depending on the GUIM_BOOPSILook tag).
  1338.  
  1339.               GUIM_ReadOnly (BOOL)
  1340.                  TRUE to create a read-only image gadget.
  1341.  
  1342.               GUIM_BOOPSILook (BOOL)
  1343.                  This tag will allow the programmer to select how the
  1344.                  secondary image should be shown, if only one image is
  1345.                  used for the gadget. Defaults to TRUE, which means that
  1346.                  the background color will change when the user selects
  1347.                  the gadget.
  1348.  
  1349.          DRAWER_KIND
  1350.            A "select drawer" image button. This can be used to select
  1351.            a path, but is often used to select files.
  1352.  
  1353.          FILE_KIND
  1354.            A "select file" image button. This can be used to allow the
  1355.            user to select a file. Most programs uses the DRAWER_KIND
  1356.            for both file and path selection.
  1357.  
  1358.          BEVELBOX_KIND
  1359.            A GadTools bevelbox. Use this to avoid the use of absolute
  1360.            sizing of bevelboxes. All bevel box kinds from OS3.0 is
  1361.            supported, even if the computer only has OS2.0.
  1362.  
  1363.            Extra tags for BEVELBOX_KIND:
  1364.  
  1365.               GUBB_Recessed (BOOL)
  1366.                  Create a recessed ("pushed in") bevel box. Differs from
  1367.                  the GadTools tag GTBB_Recessed, in that it works with
  1368.                  both TRUE and FALSE as parameter. GadTools creates a
  1369.                  recessed box independent from the given value.
  1370.  
  1371.                  Defaults to FALSE.
  1372.  
  1373.               GUBB_FrameType (ULONG)
  1374.                  Determines what kind of box this function renders. The
  1375.                  current available alternatives are:
  1376.  
  1377.                     BFT_BUTTON - Generates a box like what is used around
  1378.                                  a GadTools BUTTON_KIND gadget.
  1379.  
  1380.                     BFT_RIDGE - Generates a box like what is used around
  1381.                                 a GadTools STRING_KIND gadget.
  1382.  
  1383.                     BFT_DROPBOX - Generates a box suitable for a standard
  1384.                                   icon drop box imagery.
  1385.  
  1386.                     BFT_HORIZBAR - Generates a horizontal shadowed line.
  1387.                                    Can also be used to draw a normal line,
  1388.                                    using 1 for the line's height.
  1389.  
  1390.                     BFT_VERTBAR - Generates a vertical shadowed line. Can
  1391.                                   also be used to draw a normal line, using
  1392.                                   1 for the line's width.
  1393.  
  1394.                  Defaults to BFT_BUTTON.
  1395.  
  1396.               GUBB_TextColor (ULONG)
  1397.                  Selects which color to print the title text in. Only useful
  1398.                  for a bevelbox with a title. Defaults to the color of the
  1399.                  TEXTPEN.
  1400.  
  1401.              GUBB_TextPen (ULONG)
  1402.                  Selects which pen to print the title text in. Only
  1403.                  useful for a bevelbox with a title. Defaults to TEXTPEN.
  1404.                  This tag overrides the GUBB_TextColor tag.
  1405.  
  1406.               GUBB_Flags (ULONG)
  1407.                  Currently, only text placement flags are defined. These are:
  1408.  
  1409.                  Y-pos flags
  1410.                  ~~~~~~~~~~~
  1411.                     BB_TEXT_ABOVE - Places the bevel box text above the upper
  1412.                                     border of the box           ___Example___
  1413.  
  1414.                     BB_TEXT_IN    - Places the bevel box text at the upper
  1415.                                     border of the box           ---Example---
  1416.  
  1417.                     BB_TEXT_BELOW - Places the bevel box text below the upper
  1418.                                     border of the box           ___       ___
  1419.                                                                    Example
  1420.                  X-pos flags
  1421.                  ~~~~~~~~~~~
  1422.                     BB_TEXT_CENTER - Places the bevel box text in the middle
  1423.                                      of the upper border        ---Example---
  1424.  
  1425.                     BB_TEXT_LEFT   - Places the bevel box text 8 pixels from
  1426.                                      the left edge of the box   -Example-----
  1427.  
  1428.                     BB_TEXT_RIGHT  - Places the bevel box text 8 pixels from
  1429.                                      the right edge of the box  -----Example-
  1430.  
  1431.                  Combined flags
  1432.                  ~~~~~~~~~~~~~~
  1433.                     BB_TEXT_ABOVE_CENTER - BB_TEXT_ABOVE + BB_TEXT_CENTER
  1434.                     BB_TEXT_ABOVE_LEFT   - BB_TEXT_ABOVE + BB_TEXT_LEFT
  1435.                     BB_TEXT_ABOVE_RIGHT  - BB_TEXT_ABOVE + BB_TEXT_RIGHT
  1436.  
  1437.                     BB_TEXT_IN_CENTER    - BB_TEXT_IN + BB_TEXT_CENTER
  1438.                     BB_TEXT_IN_LEFT      - BB_TEXT_IN + BB_TEXT_LEFT
  1439.                     BB_TEXT_IN_RIGHT     - BB_TEXT_IN + BB_TEXT_RIGHT
  1440.  
  1441.                     BB_TEXT_BELOW_CENTER - BB_TEXT_BELOW + BB_TEXT_CENTER
  1442.                     BB_TEXT_BELOW_LEFT   - BB_TEXT_BELOW + BB_TEXT_LEFT
  1443.                     BB_TEXT_BELOW_RIGHT  - BB_TEXT_BELOW + BB_TEXT_RIGHT
  1444.  
  1445.                  Default if BB_TEXT_ABOVE|BB_TEXT_CENTER. Combine the x and y
  1446.                  position flags by OR:ing them together. Don't combine two X
  1447.                  or two Y flags together.
  1448.                 
  1449.                  Shadow placement flags
  1450.                  ~~~~~~~~~~~~~~~~~~~~~~
  1451.                     BB_SHADOW_DR - Places the bevel box text shadow one pixel
  1452.                                    below and to the right of the text. 
  1453.  
  1454.                     BB_SHADOW_UR - Places the bevel box text shadow one pixel
  1455.                                    above and to the right of the text. 
  1456.  
  1457.                     BB_SHADOW_DL - Places the bevel box text shadow one pixel
  1458.                                    below and to the left of the text. 
  1459.  
  1460.                     BB_SHADOW_UL - Places the bevel box text shadow one pixel
  1461.                                    above and to the left of the text. 
  1462.  
  1463.                     BB_SUNAT_UL  - Another name for BB_SHADOW_DR
  1464.                     BB_SUNAT_DL  - Another name for BB_SHADOW_UR
  1465.                     BB_SUNAT_UR  - Another name for BB_SHADOW_DL
  1466.                     BB_SUNAT_DR  - Another name for BB_SHADOW_UL
  1467.  
  1468.                  Default if BB_SHADOW_DR (BB_SUNAT_UL).
  1469.  
  1470.               GUBB_3DText (BOOL)
  1471.                  Enables the shadow on the bevel box text. This tag must be
  1472.                  used if GUBB_ShadowColor or GUBB_ShadowPen isn't used.
  1473.  
  1474.              GUBB_ShadowColor (ULONG)
  1475.                  Selects which color to print the shadow text in. Only useful
  1476.                  for a bevelbox with a title. Defaults to the color of the
  1477.                  SHADOWPEN.
  1478.  
  1479.               GUBB_ShadowPen (ULONG)
  1480.                  Selects which pen to print the shadow text in. Only useful
  1481.                  for a bevelbox with a title. Defaults to SHADOWPEN.
  1482.                  This tag overrides the GUBB_ShadowColor tag.
  1483.  
  1484.          PROGRESS_KIND
  1485.            Gadget used to display a value out of a total. Can be used to
  1486.            display the progress of a search, a diskcopy or anything else.
  1487.  
  1488.            Extra tags for PROGRESS_KIND:
  1489.  
  1490.               GUPR_FillColor (ULONG)
  1491.                  Selects which color to use to paint the current value of
  1492.                  the progress requester with. Defaults to the color of the
  1493.                  FILLPEN.
  1494.  
  1495.               GUPR_FillPen (ULONG)
  1496.                  Selects which pen to use to paint the current value of
  1497.                  the progress requester with. Defaults to the FILLPEN.
  1498.                  This tag overrides the GUPR_FillColor tag.
  1499.  
  1500.               GUPR_BackColor (ULONG)
  1501.                  Selects which color to fill the background of the progress
  1502.                  requester with. Defaults to the color of the BACKGROUNDPEN.
  1503.  
  1504.               GUPR_BackPen (ULONG)
  1505.                  Selects which pen to fill the background of the progress
  1506.                  requester with. Defaults to the BACKGROUNDPEN.
  1507.                  This tag overrides the GUPR_BackColor tag.
  1508.  
  1509.               GUPR_Current (ULONG)
  1510.                  The initial current value of the progress requester. The
  1511.                  gadget's current value may be changed later by directly
  1512.                  modifying the pg_Current field of the ProgressGad structure.
  1513.                  Use GU_UpdateProgress to redraw the progress requester with
  1514.                  the new value. The pg_Current field must not be larger than
  1515.                  4.294.967.295 / the width of the progress gadget. A "normal"
  1516.                  width of 410 pixels allows a current value of 10.737.418.
  1517.          Defaults to 0.
  1518.  
  1519.               GUPR_Total (ULONG)
  1520.                  The initial total value of the progress requester. The
  1521.                  gadget's total value may be changed later by directly
  1522.                  modifying the pg_Total field of the ProgressGad structure.
  1523.                  Use GU_UpdateProgress to redraw the progress requester with
  1524.                  the new value. The total value can be as large as a longword
  1525.                  allows (4.294.967.295), but you can't display a current value
  1526.                  larger than 4.294.967.295 / the width of the progress gadget.
  1527.          Defaults to 100.
  1528.  
  1529.          Changed tags, and additions to GadTools:
  1530.  
  1531.          LISTVIEW_KIND
  1532.  
  1533.            GTLV_ShowSelected (UWORD id)
  1534.  
  1535.               This tag was changed, so that you don't have to create the
  1536.               string gadget before all other gadgets. The difference from
  1537.               this tag in GadTools, is that we now have to give the ID of
  1538.               the string gadget to use to show the selected item.
  1539.  
  1540.               An example of a valid (and probably most useful) gadget to
  1541.               use for GTLV_ShowSelected:
  1542.  
  1543.               ShowSelGad:
  1544.                   dc.l    GU_GadgetKind,  STRING_KIND,    GU_AutoHeight,  4
  1545.                   dc.l    GU_DupeWidth,   GAD_LISTVIEW,   GU_GadgetText,  NULL
  1546.                   dc.l    TAG_DONE
  1547.  
  1548.               This gadget MUST be before the LISTVIEW gadget in the LayoutGadget
  1549.               array.
  1550.  
  1551.               Special:
  1552.  
  1553.               ti_Data = -1    Creates a read-only gadget below the listview,
  1554.                               same as for GTLV_ShowSelected, 0  for GadTools.
  1555.  
  1556.               ti_Data =  x    Gadget ID for the gadget that the selected item
  1557.                               should be displayed in. Same as GadTools reaction
  1558.                               on a gadget pointer in ti_Data.
  1559.  
  1560.               This gadget's ti_Data field will be changed during the creation
  1561.               of the gadget, but will be changed back before GU_LayoutGadgets
  1562.               returns.
  1563.  
  1564.          MX_KIND
  1565.           The gng_GadgetText field in the NewGadget structure can be used
  1566.           even with MX_KIND gadgets. This should have been included in
  1567.           GadTools. The gadget text will always be placed ABOVE the gadget,
  1568.           on the same side as the other texts for the gadget. Positions are
  1569.           checked against WBPattern & SerialPrefs to get them "right". The
  1570.           GU_GadgetText and GU_LocaleText tags are used to access this field.
  1571.  
  1572.  
  1573.    Tags for all gadget kinds:
  1574.  
  1575.    Gadget width control:
  1576.  
  1577.       GU_Width (UWORD wid)
  1578.          Absolute width of the gadget. Not recommended to use for other
  1579.          gadgets than IMAGE_KIND, DRAWER_KIND and FILE_KIND.
  1580.  
  1581.       GU_DupeWidth (UWORD id)
  1582.          Duplicate the width of another gadget.
  1583.  
  1584.       GU_AutoWidth (WORD add)
  1585.          Width = length of text label + ti_Data. For CYCLE_KIND gadgets,
  1586.      the gadget width will be calculated by checking the length of
  1587.      all alternatives and using the one that is widest + 26 as width.
  1588.  
  1589.       GU_Columns (UWORD numcols)
  1590.          Set the gadget width so that approximately ti_Data columns of
  1591.          text will fit.
  1592.  
  1593.       GU_AddWidth (WORD add)
  1594.          Add ti_Data to the total width calculation.
  1595.  
  1596.       GU_MinWidth (UWORD wid)
  1597.          Make the gadget at least ti_Data pixels wide.
  1598.  
  1599.       GU_MaxWidth (UWORD wid)
  1600.          Make the gadget at most ti_Data pixels wide.
  1601.  
  1602.       GU_AddWidChar (WORD chars)
  1603.          Add the length of ti_Data characters to the total width calculation.
  1604.  
  1605.       GU_FractWidth (LONG parts)
  1606.      Divide or multiply the gadget's width with ti_Data. A positive
  1607.      value divides the gadget's width by the ti_Data, a negative ti_Data
  1608.      multiplies the gadget's width with ti_Data.
  1609.  
  1610.     Gadget height control:
  1611.  
  1612.       GU_Height (UWORD hei)
  1613.          Absolute height of the gadget. Not recommended to use for other
  1614.          gadgets than IMAGE_KIND, DRAWER_KIND and FILE_KIND.
  1615.         
  1616.       GU_DupeHeight (UWORD id)
  1617.          Duplicate the height of another gadget.
  1618.  
  1619.       GU_AutoHeight (WORD add)
  1620.          Height = height of the gadget's font + ti_Data. This tag doesn't
  1621.          work as it should with MX_KIND gadgets. Will be fixed later.
  1622.          Use GU_HeightFactor or GU_Height for MX_KIND until this is fixed.
  1623.  
  1624.       GU_HeightFactor (UWORD numlines)
  1625.          Set the gadget height to approximately ti_Data lines.
  1626.  
  1627.       GU_AddHeight (WORD add)
  1628.          Add ti_Data to the total height calculation.
  1629.  
  1630.       GU_MinHeight (UWORD wid)
  1631.          Make the gadget at least ti_Data pixels high.
  1632.  
  1633.       GU_MaxHeight (UWORD wid)
  1634.          Make the gadget at most ti_Data pixels high.
  1635.  
  1636.       GU_AddHeiLines (WORD numlines)
  1637.          Add the height of ti_Data/2 lines to the final height calculation.
  1638.          The numlines argument is given in units of 1/2 lines to get
  1639.          better resolution (ti_Data of 4 means that the height of 2
  1640.          lines should be added).
  1641.  
  1642.       GU_FractHeight (LONG parts)
  1643.      Divide or multiply the gadget's height with ti_Data. A positive
  1644.      value divides the gadget's height by the ti_Data, a negative ti_Data
  1645.      multiplies the gadget's height with ti_Data.
  1646.  
  1647.    Gadget top edge control:
  1648.  
  1649.       GU_Top, GU_TopRel and GU_AlignTop locks the top edge of the gadget, and
  1650.       allows any bottom edge control tag to adjust the height, so that both
  1651.       top and bottom edges will be correct.
  1652.  
  1653.       GU_Top (UWORD ypos)
  1654.          Absolute top edge of the gadget. Not recommended to use for other
  1655.          gadgets than the top-most gadgets.
  1656.  
  1657.       GU_TopRel (UWORD id)
  1658.          Make the top edge relative to another gadgets bottom edge. This
  1659.          gadget will be placed BELOW the given gadget.
  1660.  
  1661.       GU_AddTop (WORD add)
  1662.          Add ti_Data to the final top edge calculation.
  1663.  
  1664.       GU_AlignTop (UWORD id)
  1665.          Align the top edge of the gadget with another gadgets top edge.
  1666.  
  1667.       GU_AdjustTop (WORD add)
  1668.          Add the height of the text font + ti_Data to the top edge.
  1669.  
  1670.       GU_AddTopLines (WORD numlines)
  1671.          Add the height of ti_Data/2 lines to the final top edge. The
  1672.          numlines argument is given in units of 1/2 lines to get better
  1673.          resolution (ti_Data of 4 means that the height of 2 lines
  1674.          should be added).
  1675.  
  1676.    Gadget bottom edge control:
  1677.  
  1678.       GU_Bottom, GU_BottomRel and GU_AlignBottom locks the bottom edge of the
  1679.       gadget, and allows any top edge control tag to adjust the height, so that
  1680.       both top and bottom edges will be correct.
  1681.  
  1682.       GU_Bottom (UWORD ypos)
  1683.          Absolute bottom edge of the gadget. Not recommended to use for other
  1684.          gadgets than the bottom-most gadgets. Should not be necessary to use
  1685.          at all.
  1686.  
  1687.       GU_BottomRel (UWORD id)
  1688.          Make the bottom edge relative to another gadgets top edge. This
  1689.          gadget will be placed ABOVE the given gadget.
  1690.  
  1691.       GU_AddBottom (WORD add)
  1692.          Add ti_Data to the final bottom edge calculation.
  1693.  
  1694.       GU_AlignBottom (UWORD id)
  1695.          Align the bottom edge of the gadget with another gadgets bottom edge.
  1696.  
  1697.       GU_AdjustBottom (WORD add)
  1698.          Subtract the height of the gadget's font + ti_Data from the top edge.
  1699.          This will move the gadget UPWARDS (ti_Data + font height) pixels.
  1700.  
  1701.    Gadget left edge control:
  1702.  
  1703.       GU_Left, GU_LeftRel and GU_AlignLeft locks the left edge of the gadget,
  1704.       and allows any right edge control tag to adjust the width, so that both
  1705.       left and right edges will be correct.
  1706.  
  1707.       GU_Left (UWORD xpos)
  1708.          Absoulute left edge of the gadget. Not recommended to use for other
  1709.          gadgets than the left-most gadgets.
  1710.  
  1711.       GU_LeftRel (UWORD id)
  1712.          Make the left edge relative to another gadgets right edge. This
  1713.          gadget will be placed TO THE RIGHT of the given gadget.
  1714.  
  1715.       GU_AddLeft (WORD add)
  1716.          Add ti_Data to the final left edge calculation.
  1717.  
  1718.       GU_AlignLeft (UWORD id)
  1719.          Align the left edge of the gadget with another gadgets left edge.
  1720.  
  1721.       GU_AdjustLeft (WORD add)
  1722.          Add the width of the gadget label + ti_Data to the left edge.
  1723.  
  1724.       GU_AddLeftChar (WORD chars)
  1725.          Add the length of ti_Data characters to the left edge.
  1726.  
  1727.    Gadget right edge control:
  1728.  
  1729.       GU_Right, GU_RightRel and GU_AlignRight locks the right edge of the
  1730.       gadget, and allows any left edge control tag to adjust the width, so
  1731.       that both left and right edges will be correct.
  1732.  
  1733.       GU_Right (UWORD xpos)
  1734.          Absoulute right edge of the gadget. Not recommended to use for other
  1735.          gadgets than the right-most gadgets. Should not be necessary to use
  1736.          at all.
  1737.  
  1738.       GU_RightRel (UWORD id)
  1739.          Make the right edge relative to another gadgets left edge. This
  1740.          gadget will be placed TO THE LEFT of the given gadget.
  1741.  
  1742.       GU_AddRight (WORD add)
  1743.          Add ti_Data to the final right edge calculation.
  1744.  
  1745.       GU_AlignRight (UWORD id)
  1746.          Align the right edge of the gadget with another gadgets right edge.
  1747.  
  1748.       GU_AdjustRight (WORD add)
  1749.          Add the width of the gadget label + ti_Data to the left edge.
  1750.  
  1751.     Other tags:
  1752.  
  1753.       GU_ToggleSelect (BOOL)
  1754.          Create a toggle select gadget. Works with BUTTON_KIND and IMAGE_KIND
  1755.          gadgets.
  1756.  
  1757.       GU_Selected (BOOL)
  1758.          Set the initial value of a toggle select gadget.
  1759.  
  1760.       GU_Hotkey (CHAR)
  1761.          Hotkey that should simulate a press (release) of a gadget.
  1762.  
  1763.       GU_HotkeyCase (BOOL)
  1764.          Make the hotkey case-sensitive. Default is not case sensitive.
  1765.  
  1766.       GU_LabelHotkey (BOOL)
  1767.          Get the hotkey directly from the gadget's label. The hotkey can
  1768.          be case-sensitive, but not for CYCLE, LISTVIEW and MX gadgets.
  1769.  
  1770.       GU_RawKey (BYTE)
  1771.          Use a rawkey as a gadget hotkey. May not be case-sensitive.
  1772.         
  1773.    Tags that gives access to other fields in the NewGadget structure:
  1774.  
  1775.       GU_GadgetText (UBYTE *)
  1776.          A pointer to the gadget's label. Will be copied directly into the
  1777.          gng_GadgetText field of the NewGadget structure.
  1778.  
  1779.       GU_TextAttr (struct TextAttr *)
  1780.          A pointer to an initialized TextAttr structure (to select the font).
  1781.          Will be copied directly into the gng_TextAttr field of the NewGadget
  1782.          structure.
  1783.  
  1784.       GU_Flags (ULONG)
  1785.          Gadget flags. Currently available flags are as for GadTools, but
  1786.          here is a short list of them:
  1787.  
  1788.          PLACETEXT_LEFT - Place the gadget label right aligned on the left
  1789.                           side of the gadget.
  1790.  
  1791.          PLACETEXT_RIGHT - Place the gadget label left aligned on the right
  1792.                            side of the gadget.
  1793.  
  1794.          PLACETEXT_ABOVE - Place the gadget label centered above the gadget.
  1795.  
  1796.          PLACETEXT_BELOW - Place the gadget label centered below the gadget.
  1797.  
  1798.          PLACETEXT_IN - Place the gadget label centered inside the gadget.
  1799.  
  1800.          NG_HIGHLABEL - Highlight the label (render it using SHINEPEN).
  1801.  
  1802.       GU_UserData (APTR)
  1803.          Storage for your own data. Will probably be removed, since GadUtil
  1804.          uses this filed for an internal structure (with some external
  1805.          available fields).
  1806.  
  1807.       GU_LocaleText (ULONG stringid)
  1808.          Get gadget label from a catalog. This allows easy localization of
  1809.          all new programs.
  1810.  
  1811.  
  1812.    RESULT
  1813.     gad_info - a pointer to a private structure. You must keep this
  1814.            value and pass it to GU_FreeLayoutGadgets() later on
  1815.            in order to free up all resources used by your gadgets.
  1816.            This pointer is also used in a lot of other functions
  1817.            in this library.
  1818.  
  1819.    NOTES
  1820.     You must be careful with the taglist in the lg_LayoutTags field.
  1821.     Tags are processed sequentally in the order you give them in, and
  1822.     if a tag references another gadget (eg. the GL_TopRel tag), then
  1823.     processing of the current gadget halts while the referenced gadget
  1824.     is processed (if it has not already been processed). Problems can
  1825.     occur if this gadget refers back to the original gadget that
  1826.     referenced if, if it is referring to a field that has not yet been
  1827.     processed in that gadget.
  1828.  
  1829.         Also note that you do not have to specify any tags that do not
  1830.         change from gadget to gadget. Just be sure that you know in which
  1831.     order the gadgets are processed (eg. relatives etc).
  1832.  
  1833.     Another thing to note, is that we have tried to make the processing
  1834.     of position and width / height tags as usable as possible, what I
  1835.     mean with this, is that if you eg first define the left edge and
  1836.     then define the right edge, the width will change. BUT, there are
  1837.     special cases when this isn't true. This is because we have tried
  1838.     out this and decided that this was the best way to do it.
  1839.  
  1840.     Here comes some examples of the special cases;
  1841.  
  1842.     dc.l    GU_AlignLeft, GAD_1    ; Left edge aligned with GAD_1's left.
  1843.     dc.l    GU_AlignRight, GAD_2    ; This stretches the gadget, so that
  1844.                     ; both the left and right edges are
  1845.                     ; positioned as defined.
  1846.     ; Then, if we want to move the right edge 2 pixels right, and the left
  1847.     ; edge two pixels right, we might try this:
  1848.  
  1849.     dc.l    GU_AddLeft, -2        ; This works as we want, it moves the
  1850.                     ; left edge to the right place, but it
  1851.                     ; also moves the whole gadget two
  1852.                     ; pixels left..
  1853.  
  1854.     dc.l    GU_AddRight, 2        ; <- This is a common mistake. This
  1855.                     ; moves the whole gadget to the right.
  1856.                     ; Ie. it is moved back to the old
  1857.                     ; position, not as we wanted...
  1858.  
  1859.     ; But if we replace the previous line with the following;
  1860.  
  1861.     dc.l    GU_AddWith,4        ; This works just as we wanted it to.
  1862.                     ; Now the gadget should be 4 pixels
  1863.                     ; wider, two to the left and two to
  1864.                     ; the right.
  1865.  
  1866.     The same goes for GU_AddHeight and GU_AddBottom etc.
  1867.  
  1868.     This is actually a feature. Sometimes you might want to move the whole
  1869.     button, so we made it work this way.
  1870.  
  1871.  
  1872.    SEE ALSO
  1873.     GU_FreeLayoutGadgets(), GU_CreateGadgetA(), gadtools/CreateGadgetA()
  1874. gadutil.library/GU_LayoutMenuItemsA       gadutil.library/GU_LayoutMenuItemsA
  1875.  
  1876.    NAME
  1877.     GU_LayoutMenuItemsA -- Position all the menu items.
  1878.  
  1879.    SYNOPSIS
  1880.     success = GU_LayoutMenuItemsA(menuitem, vi, tags)
  1881.     D0                            A0        A1  A2
  1882.  
  1883.     BOOL GU_LayoutMenuItemsA(struct MenuItem *, APTR, struct TagItem *);
  1884.  
  1885.    FUNCTION
  1886.     Lays out all the menu items and sub-items according to
  1887.     the supplied visual information and tag parameters. You would use this
  1888.     if you used CreateMenusA() to make a single menu-pane (with sub-items,
  1889.     if any), instead of a whole menu strip.
  1890.     This routine attempts to columnize and/or shift the MenuItems in
  1891.     the event that a menu would be too tall or too wide.
  1892.  
  1893.    INPUTS
  1894.     menuitem - Pointer to the first MenuItem in a linked list of items.
  1895.     vi       - Pointer returned by GU_GetVisualInfoA().
  1896.     tags     - Pointer to an array of tags providing optional extra
  1897.                information.
  1898.  
  1899.    TAGS
  1900.     See gadtools/LayoutMenuItemsA() for tags.
  1901.  
  1902.    RESULT
  1903.     success  - TRUE if successfull, FALSE otherwise.
  1904.  
  1905.    SEE ALSO
  1906.     GU_CreateMenusA(), GU_GetVisualInfoA(), gadtools/LayoutMenuItemsA()
  1907. gadutil.library/GU_LayoutMenusA       gadutil.library/GU_LayoutMenusA
  1908.  
  1909.    NAME
  1910.     GU_LayoutMenusA -- Position all the menus and menu items.
  1911.  
  1912.    SYNOPSIS
  1913.     success = GU_LayoutMenusA(menu, vi, taglist)
  1914.     D0                        A0    A1  A2
  1915.  
  1916.     BOOL GU_LayoutMenusA(struct Menu *, APTR, struct TagItem *);
  1917.  
  1918.    FUNCTION
  1919.     Lays out all the menus, menu items and sub-items in the supplied
  1920.     menu according to the supplied visual information and tag parameters.
  1921.     This routine attempts to columnize and/or shift the MenuItems in
  1922.     the event that a menu would be too tall or too wide.
  1923.  
  1924.     These GadTools routines are only here to make it simpler for someone
  1925.     who wants to use them. This for example, is of no use if you use the
  1926.     GadUtil function GU_CreateLocMenuA() to define localized (optional)
  1927.     menus with automatic hotkey handlimg etc.
  1928.  
  1929.    INPUTS
  1930.     menu    - Pointer to menu obtained from GU_CreateMenusA() or
  1931.               GU_CreateLocMenuA().
  1932.     vi      - Pointer returned by GU_GetVisualInfoA.
  1933.     taglist - Pointer to an array of tags providing optional extra
  1934.               parameters.
  1935.  
  1936.    TAGS
  1937.     See gadtools/LayoutMenusA() for tags.
  1938.  
  1939.    RESULT
  1940.     success - TRUE if successfull, FALSE otherwise.
  1941.  
  1942.    NOTES
  1943.     See gadtools/LayoutMenusA() for more information.
  1944.  
  1945.    SEE ALSO
  1946.     GU_CreateMenusA(), GU_GetVisualInfoA(), gadtools/LayoutMenusA()
  1947. gadutil.library/GU_NewList                         gadutil.library/GU_NewList
  1948.  
  1949.    NAME
  1950.     GU_NewList -- Initialize a list header for use.
  1951.  
  1952.    SYNOPSIS
  1953.     GU_NewList(list)
  1954.                A0
  1955.  
  1956.     VOID GU_NewList(struct List *);
  1957.  
  1958.    FUNCTION
  1959.     This initializes a list header for use. Much easier than to do it
  1960.     by hand.
  1961.  
  1962.    INPUTS
  1963.     list - Struct List.
  1964.  
  1965.    RESULT
  1966.     none
  1967.  
  1968.    BUGS
  1969.     none known
  1970.  
  1971.    SEE ALSO
  1972.     GU_AddTail(), GU_ClearList(), GU_DetachList(), GU_AttachList()
  1973.     GU_FindNode(), GU_NodeUp(), GU_NodeDown(), GU_CountNodes()
  1974. gadutil.library/GU_NodeDown                       gadutil.library/GU_NodeDown
  1975.  
  1976.    NAME
  1977.     GU_NodeDown -- Move a node one step towards the end of the list
  1978.  
  1979.    SYNOPSIS
  1980.     success = GU_NodeDown(node, list)
  1981.     D0,SR(Z)              A0    A1
  1982.  
  1983.     BOOL GU_NodeDown(struct Node *, struct List *);
  1984.  
  1985.    FUNCTION
  1986.     Move a node one step downwards in a list. To do the opposite, see
  1987.     GU_NodeUp().
  1988.  
  1989.    INPUTS
  1990.     node - The node to move.
  1991.     list - The list that the node is a part of.
  1992.  
  1993.    RESULT
  1994.     success - TRUE if the node could be moved, else FALSE.
  1995.     SR (Z)  - 0 if node could be moved, else 1.
  1996.  
  1997.    BUGS
  1998.     none known
  1999.  
  2000.    SEE ALSO
  2001.     GU_AddTail(), GU_ClearList(), GU_DetachList(), GU_AttachList()
  2002.     GU_FindNode(), GU_NodeUp(), GU_CountNodes(), GU_NewList()
  2003. gadutil.library/GU_NodeUp                           gadutil.library/GU_NodeUp
  2004.  
  2005.    NAME
  2006.     GU_NodeUp -- Move a node one step towards the top of the list
  2007.  
  2008.    SYNOPSIS
  2009.     success = GU_NodeUp(node, list)
  2010.     D0,SR(Z)            A0    A1
  2011.  
  2012.     BOOL GU_NodeUp(struct Node *, struct List *);
  2013.  
  2014.    FUNCTION
  2015.     Move a node one step up. You can also use the function GU_NodeDown()
  2016.     for moving downwards.
  2017.  
  2018.    INPUTS
  2019.     node - The node to move.
  2020.     list - The list that the node is a part of.
  2021.  
  2022.    RESULT
  2023.     success - TRUE if the node could be moved, else FALSE
  2024.     SR(Z)   - 0 if the node could be moved, else 1.
  2025.  
  2026.    BUGS
  2027.     none known
  2028.  
  2029.    SEE ALSO
  2030.     GU_AddTail(), GU_ClearList(), GU_DetachList(), GU_AttachList(),
  2031.     GU_FindNode(), GU_NodeDown(), GU_CountNodes(), GU_NewList()
  2032. gadutil.library/GU_OpenCatalog                 gadutil.library/GU_OpenCatalog
  2033.  
  2034.    NAME
  2035.     GU_OpenCatalog -- Open a message catalog.
  2036.  
  2037.    SYNOPSIS
  2038.     catalog = GU_OpenCatalog(name, version)
  2039.     D0                       A0    D0
  2040.  
  2041.     struct Catalog *GU_OpenCatalog(STRPTR, ULONG);
  2042.  
  2043.    FUNCTION
  2044.     This function opens a message catalog. Catalogs contain all the
  2045.     text strings that an application uses. These strings can easily
  2046.     be replaced by strings in a different language, which causes the
  2047.     application to magically start operation in that new language.
  2048.  
  2049.     Catalogs originally come from disk files. This function searches
  2050.     for them in the following places:
  2051.  
  2052.         PROGDIR:Catalogs/languageName/name
  2053.         LOCALE:Catalogs/languageName/name
  2054.  
  2055.     where languageName is the name of the language associated with the
  2056.     locale parameter.
  2057.  
  2058.    INPUTS
  2059.     catalogname - the NULL terminated name of the catalog to open (just
  2060.               the name, not the complete path to it).
  2061.  
  2062.     version - required version of the catalog to open. Passign 0 as version
  2063.           number means that the program will accept any found version of
  2064.           the catalog. Other values than 0 means exactly that version.
  2065.  
  2066.    RESULT
  2067.     catalog - A message catalog to use with GU_GetLocaleStr or any of the
  2068.           Locale library functions or NULL. NULL is returned on error
  2069.           or if the application can use its built-in strings instead
  2070.           of loading a catalog from disk.
  2071.  
  2072.    EXAMPLE
  2073.     GU_OpenCatalog("myprogram.catalog",0);
  2074.  
  2075.     will open any version of the catalog file "myprogram.catalog" found
  2076.     in either PROGDIR:Catalogs/languageName/ (where the program was started
  2077.     from), or LOCALE:Catalogs/languageName/.
  2078.  
  2079.     GU_OpenCatalog("myprogram.catalog",5);
  2080.  
  2081.     will open version 5 of the catalog file. If v5 is not available, the
  2082.     program will use its internal strings.
  2083.  
  2084.    NOTES
  2085.     If you want to specify other tags than the version tag, you must
  2086.     use the Locale library OpenCatalog(). This function is generally a
  2087.     shortcut to that function. By using this routine, you may not need
  2088.     to open Locale library at all.
  2089.  
  2090.     This routine assumes that the built-in language of the program is
  2091.     english. If you write your programs in another language, you must
  2092.     open the catalog by yourself.
  2093.  
  2094.    SEE ALSO
  2095.     GU_CloseCatalog(), locale/OpenCatalog()
  2096. gadutil.library/GU_OpenFont                       gadutil.library/GU_OpenFont
  2097.  
  2098.    NAME
  2099.     GU_OpenFont -- Load and get a pointer to a disk or system font.
  2100.  
  2101.    SYNOPSIS
  2102.     font = GU_OpenFont(textAttr)
  2103.     D0                 A0
  2104.  
  2105.     struct TextFont *GU_OpenFont(struct TextAttr *);
  2106.  
  2107.    FUNCTION
  2108.     Open a disk or ROM based font. Uses diskfont library if available.
  2109.     Much easier to use than the standard OpenFont functions.
  2110.  
  2111.    INPUTS
  2112.     textAttr - This is a pointer to a TextAttr structure.
  2113.  
  2114.    RESULT
  2115.     font - Struct TextFont ot NULL for failure.
  2116.  
  2117.    BUGS
  2118.     none known
  2119.  
  2120.    SEE ALSO
  2121. gadutil.library/GU_PostFilterIMsg           gadutil.library/GU_PostFilterIMsg
  2122.  
  2123.    NAME
  2124.     GU_PostFilterIMsg -- Return the unfiltered message after
  2125.                  GU_FilterIMsg() was called, and clean up.
  2126.  
  2127.    SYNOPSIS
  2128.     imsg = GU_PostFilterIMsg(modimsg)
  2129.     D0                       A1
  2130.  
  2131.     struct IntuiMessage *GU_PostFilterIMsg(struct IntuiMessage *);
  2132.  
  2133.    FUNCTION
  2134.     NOTE WELL:  Extremely few programs will actually need this function.
  2135.     You almost certainly should be using GT_GetIMsg() and GT_ReplyIMsg()
  2136.     only, and not GT_FilterIMsg() and GT_PostFilterIMsg().
  2137.  
  2138.     Performs any clean-up necessitated by a previous call to
  2139.     GT_FilterIMsg().  The original IntuiMessage is now yours to handle.
  2140.     Do not interpret the fields of the original IntuiMessage, but
  2141.     rather use only the one you got from GT_FilterIMsg().  You
  2142.     may only do message related things at this point, such as queueing
  2143.     it up or replying it.  Since you got the message with
  2144.     exec.library/GetMsg(), your responsibilities do include replying
  2145.     it with exec.library/ReplyMsg(). This function may be safely
  2146.     called with a NULL parameter.
  2147.  
  2148.    INPUTS
  2149.     modimsg - A modified IntuiMessage obtained with GU_FilterIMsg(),
  2150.               or NULL.
  2151.  
  2152.    RESULT
  2153.     imsg - a pointer to the original IntuiMessage, if GT_FilterIMsg()
  2154.            returned non-NULL.
  2155.  
  2156.    NOTES
  2157.     See gadtools/GT_PostFilterIMsg for more information.
  2158.  
  2159.    SEE ALSO
  2160.     GU_FilterIMsg(), gadtools/GT_PostFilterIMsg()
  2161. gadutil.library/GU_RefreshBoxes               gadutil.library/GU_RefreshBoxes
  2162.  
  2163.    NAME
  2164.     GU_RefreshBoxes -- Redraw all bevel boxes in a window.
  2165.  
  2166.    SYNOPSIS
  2167.     GU_RefreshBoxes(window, gad_info)
  2168.                     A0      A1
  2169.  
  2170.     VOID GU_RefreshBoxes(struct Window *, APTR);
  2171.  
  2172.    FUNCTION
  2173.     Redraw all bevel boxes in a window.
  2174.  
  2175.    INPUTS
  2176.     window - Window to be refreshed.
  2177.  
  2178.     gad_info - The value returned by GU_LayoutGadgetsA()
  2179.  
  2180.    RESULT
  2181.     none
  2182.  
  2183.    BUGS
  2184.     no known
  2185.  
  2186.    SEE ALSO
  2187. gadutil.library/GU_RefreshWindow             gadutil.library/GU_RefreshWindow
  2188.  
  2189.    NAME
  2190.     GU_RefreshWindow -- Redraw bevel boxes and gadgets in a window.
  2191.  
  2192.    SYNOPSIS
  2193.     GU_RefreshWindow(window, gad_info)
  2194.                      A0      A1
  2195.  
  2196.     VOID GU_RefreshWindow(struct Window *, APTR);
  2197.  
  2198.    FUNCTION
  2199.     Perform the initial refresh of all the GadTools gadgets you have
  2200.     created. After you have opened your window, you must call this
  2201.     function. Or, if you have opened your window without gadgets,
  2202.     you add the gadgets with intuition/AddGList(), refresh them using
  2203.     intuition/RefreshGList(), then call this function. You should not
  2204.     need this function at other times.
  2205.  
  2206.     This function differs from the gadtools/GT_RefreshWindow(), in that
  2207.     is also renders all bevelbox kind gadgets. If NULL is given in
  2208.     gad_info, no boxes will be rendered, and this function will work
  2209.     exactly as the GT_RefreshWindow().
  2210.  
  2211.    INPUTS
  2212.     window - pointer to the window containing GadTools gadgets.
  2213.  
  2214.     gad_info - the value returned from GU_LayoutGadgetsA(), or NULL.
  2215.  
  2216.    SEE ALSO
  2217.     GU_BeginRefresh()
  2218. gadutil.library/GU_ReplyIMsg                     gadutil.library/GU_ReplyIMsg
  2219.  
  2220.    NAME
  2221.     GU_ReplyIMsg -- Reply a message obtained with GU_GetIMsg().
  2222.  
  2223.    SYNOPSIS
  2224.     GU_ReplyIMsg(imsg)
  2225.                  A1
  2226.  
  2227.     VOID GU_ReplyIMsg(struct IntuiMessage *);
  2228.  
  2229.    FUNCTION
  2230.     Return a modified IntuiMessage obtained with GU_GetIMsg(). If you
  2231.     use GU_GetIMsg(), use this function where you would normally have
  2232.     used exec/ReplyIMsg() or gadtools/GT_ReplyIMsg(). You may safely
  2233.     call this function with a NULL pointer (nothing will be done).
  2234.  
  2235.    INPUTS
  2236.     imsg - a modified IntuiMessage obtained with GT_GetIMsg(), or NULL
  2237.            in which case this function does nothing.
  2238.  
  2239.    NOTES
  2240.     When using GadUtil, you MUST explicitly GU_ReplyIMsg() all messages
  2241.     you receive. You cannot depend on CloseWindow() to handle messages
  2242.     you have not replied.
  2243.  
  2244.     Starting with V39, this function actually expects a pointer to an
  2245.     ExtIntuiMessage structure, but the prototype was not changed for
  2246.     source code compatibility with older software.
  2247.  
  2248.    SEE ALSO
  2249.     GU_GetIMsg()
  2250. gadutil.library/GU_SetGadgetAttrsA         gadutil.library/GU_SetGadgetAttrsA
  2251.  
  2252.    NAME
  2253.     GU_SetGadgetAttrsA -- Change the attributes of a GadTools gadget.
  2254.  
  2255.    SYNOPSIS
  2256.     GU_SetGadgetAttrsA(gad, win, req, taglist)
  2257.                        A0    A1  A2   A3
  2258.  
  2259.     VOID GU_SetGadgetAttrsA(struct Gadget *, struct Window *,
  2260.                 struct Requester *, struct TagItem *);
  2261.  
  2262.    FUNCTION
  2263.     Change the attributes of the specified gadget, according to the
  2264.     attributes chosen in the tag list. If an attribute is not provided
  2265.     in the tag list, its value remains the unchanged. This function
  2266.     also stores some information for the hotkey part of the library.
  2267.  
  2268.     Use this in place of the gadtools function GT_SetGadgetAttrsA().
  2269.  
  2270.    INPUTS
  2271.     gad - pointer to the gadget in question. This address may be NULL,
  2272.           in which case this function does nothing.
  2273.  
  2274.     win - pointer to the window containing the gadget. Starting with
  2275.           V39 (of the OS), this value may be NULL, in which case the
  2276.           internal attributes of the gadgets are altered but no
  2277.           rendering occurs.
  2278.  
  2279.     req - reserved for future use, should always be NULL.
  2280.  
  2281.     taglist - pointer to an array of tags providing optional extra
  2282.           parameters, or NULL.
  2283.  
  2284.    TAGS
  2285.     See the GadTools function GT_SetGadgetAttrsA() for all tags, since
  2286.     this is an extended version of that routine.
  2287.  
  2288.    NOTES
  2289.     This function may not be called inside of a GU_BeginRefesh() /
  2290.     GU_EndRefresh() session. (as always, restrict yourself to simple
  2291.     rendering functions).
  2292.  
  2293.    SEE ALSO
  2294.     gadtools/GT_SetGadgetAttrsA(), GU_GetGadgetAttrsA()
  2295. gadutil.library/GU_SetGUGadAttrsA           gadutil.library/GU_SetGUGadAttrsA
  2296.  
  2297.    NAME
  2298.     GU_SetGUGadAttrsA -- Change the attributes of a GadUtil gadget.
  2299.  
  2300.    SYNOPSIS
  2301.     GU_SetGUGadAttrsA(gad_info, gad, win, taglist)
  2302.                           A0        A1   A2   A3
  2303.  
  2304.     VOID GU_SetGadAttrsA(APTR, struct Gadget *, struct Window *,
  2305.                 struct TagItem *);
  2306.  
  2307.    FUNCTION
  2308.     Change attributes of a GadUtil gadget.
  2309.  
  2310.    INPUTS
  2311.     gad_info - The value returned by LayoutGadgetsA().
  2312.     gad      - Pointer to the gadget in question.
  2313.     win      - Pointer to the window containing the gadget.
  2314.     taglist  - Pointer to a TagItem list.
  2315.    TAGS
  2316.     See GU_LayoutGadgetsA() for tags.
  2317.  
  2318.    RESULT
  2319.     none
  2320.  
  2321.    SEE ALSO
  2322. gadutil.library/GU_SetToggle                     gadutil.library/GU_SetToggle
  2323.  
  2324.    NAME
  2325.     GU_SetToggle -- Change status of a toggle-select gadget.
  2326.  
  2327.    SYNOPSIS
  2328.     GU_SetToggle(status, gadget, window)
  2329.                  D0,     A0,     A1
  2330.  
  2331.     VOID GU_SetToggle(BOOL, struct Gadget *, struct Window *);
  2332.  
  2333.    FUNCTION
  2334.     This function selects or unselects a toggle gadget, that means a
  2335.     gadget with the tag GU_ToggleSelect set to TRUE.
  2336.  
  2337.     For some more information about the tags, look in <libraries/gadutil.h>
  2338.     or in the autodoc for the GU_LayoutGadgetsA() function.
  2339.  
  2340.    INPUTS
  2341.     status - New status for the gadget. TRUE for selected, FALSE for
  2342.              unselected.
  2343.     gadget - The gadget to change.
  2344.     window - Window that the gadget is located in.
  2345.  
  2346.    RESULT
  2347.     none
  2348.  
  2349.    BUGS
  2350.     none known
  2351.  
  2352.    SEE ALSO
  2353.     GU_LayoutGadgetsA(), <libraries/gatutil.h>, <libraries/gadutil.i>
  2354. gadutil.library/GU_SortList                       gadutil.library/GU_SortList
  2355.  
  2356.    NAME
  2357.     GU_SortList -- Sorts all nodes in a list.
  2358.  
  2359.    SYNOPSIS
  2360.     GU_SortNode(list,slavelist)
  2361.                 A0   A1
  2362.  
  2363.     VOID GU_SortList(struct List *, struct List *);
  2364.  
  2365.    FUNCTION
  2366.     Sorts all items an a list and optionally in a slave list.
  2367.  
  2368.     The slave list option can be used eg. if you have a ListView
  2369.     gadget that shows a number of filenames and another list
  2370.     with the path-names to the files in the other list.
  2371.  
  2372.     Note that the slavelist pointer must be NULL if not used.
  2373.  
  2374.    INPUTS
  2375.     list      - A pointer to the list to sort
  2376.     slavelist - A pointer to an optional slave list (or NULL).
  2377.  
  2378.    NOTES
  2379.     Written in assembler using Shell-sort, so it is quite fast..
  2380.  
  2381.    SEE ALSO
  2382.     GU_AddTail(), GU_ClearList(), GU_DetachList(), GU_AttachList()
  2383.     GU_FindNode(), GU_NodeUp(), GU_NodeDown(), GU_NewList(), GU_CountNodes()
  2384. gadutil.library/GU_TextWidth                     gadutil.library/GU_TextWidth
  2385.  
  2386.    NAME
  2387.     GU_TextWidth -- Calculate the pixel length of a text string.
  2388.  
  2389.    SYNOPSIS
  2390.     textwidth = GU_TextWidth(string, textattr)
  2391.     D0                       A0      A1
  2392.  
  2393.     ULONG GU_TextWidth(STRPTR, struct TextAttr *);
  2394.  
  2395.    FUNCTION
  2396.     Calculate the length of the text, using the specified font. This
  2397.     function will open the required font, if it isn't opened before.
  2398.  
  2399.    INPUTS
  2400.     string - NULL terminated text to calculate width of.
  2401.  
  2402.     textattr - a filled in TextAttr structure.
  2403.  
  2404.    RESULT
  2405.     textwidth - pixel length of the text
  2406. gadutil.library/GU_UpdateProgress           gadutil.library/GU_UpdateProgress
  2407.  
  2408.    NAME
  2409.     GU_UpdateProgress -- Redraw all or specified progress gadget(s).
  2410.  
  2411.    SYNOPSIS
  2412.     GU_UpdateProgress(window, gad_info, gadget)
  2413.                       A0      A1        A2
  2414.  
  2415.     VOID GU_UpdateProgress(struct Window *, APTR, struct ProgressGad *);
  2416.  
  2417.    FUNCTION
  2418.         Redraws all or one specified PROGRESS_KIND gadget in a window.
  2419.  
  2420.    INPUTS
  2421.         window - the window that the progress gadget is in.
  2422.  
  2423.         gad_info - the value returned from GU_LayoutGadgetsA()
  2424.  
  2425.         gadget - NULL, or a pointer to a specified progress gadget to
  2426.                  redraw. If NULL is given, all progress gadgets will be
  2427.                  redrawn. Use this function to redraw the progress gad
  2428.                  after changing the total or current value.
  2429.                  This function is called automatically from GU_Refresh-
  2430.                  Boxes.
  2431.  
  2432.    SEE ALSO
  2433.         GU_RefreshBoxes(), GU_RefreshWindow()
  2434.